Format: application/octet-stream
⬇ Download File (39.6 KB)
   1  {
   2   "cells": [
   3    {
   4     "cell_type": "code",
   5     "execution_count": 1,
   6     "id": "6f2034b5",
   7     "metadata": {},
   8     "outputs": [],
   9     "source": [
  10      "import pandas as pd"
  11     ]
  12    },
  13    {
  14     "cell_type": "code",
  15     "execution_count": 2,
  16     "id": "7b7e56b0",
  17     "metadata": {},
  18     "outputs": [],
  19     "source": [
  20      "data=pd.read_csv('Final Dataa.tsv', sep='\\t')\n"
  21     ]
  22    },
  23    {
  24     "cell_type": "code",
  25     "execution_count": null,
  26     "id": "84868654",
  27     "metadata": {},
  28     "outputs": [],
  29     "source": []
  30    },
  31    {
  32     "cell_type": "code",
  33     "execution_count": 3,
  34     "id": "68b48e83",
  35     "metadata": {},
  36     "outputs": [
  37      {
  38       "data": {
  39        "text/html": [
  40         "<div>\n",
  41         "<style scoped>\n",
  42         "    .dataframe tbody tr th:only-of-type {\n",
  43         "        vertical-align: middle;\n",
  44         "    }\n",
  45         "\n",
  46         "    .dataframe tbody tr th {\n",
  47         "        vertical-align: top;\n",
  48         "    }\n",
  49         "\n",
  50         "    .dataframe thead th {\n",
  51         "        text-align: right;\n",
  52         "    }\n",
  53         "</style>\n",
  54         "<table border=\"1\" class=\"dataframe\">\n",
  55         "  <thead>\n",
  56         "    <tr style=\"text-align: right;\">\n",
  57         "      <th></th>\n",
  58         "      <th>Unnamed: 0</th>\n",
  59         "      <th>titleId</th>\n",
  60         "      <th>title</th>\n",
  61         "      <th>averageRating</th>\n",
  62         "      <th>numVotes</th>\n",
  63         "      <th>primaryTitle</th>\n",
  64         "      <th>isAdult</th>\n",
  65         "      <th>startYear</th>\n",
  66         "      <th>runtimeMinutes</th>\n",
  67         "      <th>genres</th>\n",
  68         "    </tr>\n",
  69         "  </thead>\n",
  70         "  <tbody>\n",
  71         "    <tr>\n",
  72         "      <th>0</th>\n",
  73         "      <td>0</td>\n",
  74         "      <td>tt0111161</td>\n",
  75         "      <td>The Shawshank Redemption</td>\n",
  76         "      <td>9.3</td>\n",
  77         "      <td>2405502</td>\n",
  78         "      <td>The Shawshank Redemption</td>\n",
  79         "      <td>0</td>\n",
  80         "      <td>1994</td>\n",
  81         "      <td>142</td>\n",
  82         "      <td>Drama</td>\n",
  83         "    </tr>\n",
  84         "    <tr>\n",
  85         "      <th>1</th>\n",
  86         "      <td>1</td>\n",
  87         "      <td>tt0468569</td>\n",
  88         "      <td>The Dark Knight</td>\n",
  89         "      <td>9.0</td>\n",
  90         "      <td>2365212</td>\n",
  91         "      <td>The Dark Knight</td>\n",
  92         "      <td>0</td>\n",
  93         "      <td>2008</td>\n",
  94         "      <td>152</td>\n",
  95         "      <td>Action,Crime,Drama</td>\n",
  96         "    </tr>\n",
  97         "    <tr>\n",
  98         "      <th>2</th>\n",
  99         "      <td>2</td>\n",
 100         "      <td>tt1375666</td>\n",
 101         "      <td>Inception</td>\n",
 102         "      <td>8.8</td>\n",
 103         "      <td>2122723</td>\n",
 104         "      <td>Inception</td>\n",
 105         "      <td>0</td>\n",
 106         "      <td>2010</td>\n",
 107         "      <td>148</td>\n",
 108         "      <td>Action,Adventure,Sci-Fi</td>\n",
 109         "    </tr>\n",
 110         "    <tr>\n",
 111         "      <th>3</th>\n",
 112         "      <td>3</td>\n",
 113         "      <td>tt0137523</td>\n",
 114         "      <td>Fight Club</td>\n",
 115         "      <td>8.8</td>\n",
 116         "      <td>1899050</td>\n",
 117         "      <td>Fight Club</td>\n",
 118         "      <td>0</td>\n",
 119         "      <td>1999</td>\n",
 120         "      <td>139</td>\n",
 121         "      <td>Drama</td>\n",
 122         "    </tr>\n",
 123         "    <tr>\n",
 124         "      <th>4</th>\n",
 125         "      <td>4</td>\n",
 126         "      <td>tt0110912</td>\n",
 127         "      <td>Pulp Fiction</td>\n",
 128         "      <td>8.9</td>\n",
 129         "      <td>1868911</td>\n",
 130         "      <td>Pulp Fiction</td>\n",
 131         "      <td>0</td>\n",
 132         "      <td>1994</td>\n",
 133         "      <td>154</td>\n",
 134         "      <td>Crime,Drama</td>\n",
 135         "    </tr>\n",
 136         "    <tr>\n",
 137         "      <th>...</th>\n",
 138         "      <td>...</td>\n",
 139         "      <td>...</td>\n",
 140         "      <td>...</td>\n",
 141         "      <td>...</td>\n",
 142         "      <td>...</td>\n",
 143         "      <td>...</td>\n",
 144         "      <td>...</td>\n",
 145         "      <td>...</td>\n",
 146         "      <td>...</td>\n",
 147         "      <td>...</td>\n",
 148         "    </tr>\n",
 149         "    <tr>\n",
 150         "      <th>130713</th>\n",
 151         "      <td>130713</td>\n",
 152         "      <td>tt0062253</td>\n",
 153         "      <td>7 uomini e un cervello</td>\n",
 154         "      <td>4.6</td>\n",
 155         "      <td>101</td>\n",
 156         "      <td>Criminal Affair</td>\n",
 157         "      <td>0</td>\n",
 158         "      <td>1968</td>\n",
 159         "      <td>106</td>\n",
 160         "      <td>Comedy,Crime</td>\n",
 161         "    </tr>\n",
 162         "    <tr>\n",
 163         "      <th>130714</th>\n",
 164         "      <td>130714</td>\n",
 165         "      <td>tt0068885</td>\n",
 166         "      <td>La lunga cavalcata della vendetta</td>\n",
 167         "      <td>4.6</td>\n",
 168         "      <td>101</td>\n",
 169         "      <td>Deadly Trackers</td>\n",
 170         "      <td>0</td>\n",
 171         "      <td>1972</td>\n",
 172         "      <td>92</td>\n",
 173         "      <td>Drama,Western</td>\n",
 174         "    </tr>\n",
 175         "    <tr>\n",
 176         "      <th>130715</th>\n",
 177         "      <td>130715</td>\n",
 178         "      <td>tt2583192</td>\n",
 179         "      <td>Lucid</td>\n",
 180         "      <td>4.6</td>\n",
 181         "      <td>101</td>\n",
 182         "      <td>Lucid</td>\n",
 183         "      <td>0</td>\n",
 184         "      <td>2013</td>\n",
 185         "      <td>87</td>\n",
 186         "      <td>Drama,Horror,Thriller</td>\n",
 187         "    </tr>\n",
 188         "    <tr>\n",
 189         "      <th>130716</th>\n",
 190         "      <td>130716</td>\n",
 191         "      <td>tt3899070</td>\n",
 192         "      <td>Gone Tomorrow</td>\n",
 193         "      <td>4.6</td>\n",
 194         "      <td>101</td>\n",
 195         "      <td>Gone Tomorrow</td>\n",
 196         "      <td>0</td>\n",
 197         "      <td>2015</td>\n",
 198         "      <td>90</td>\n",
 199         "      <td>Crime,Drama,Mystery</td>\n",
 200         "    </tr>\n",
 201         "    <tr>\n",
 202         "      <th>130717</th>\n",
 203         "      <td>130717</td>\n",
 204         "      <td>tt8343748</td>\n",
 205         "      <td>Seven Senses of the Re'Union</td>\n",
 206         "      <td>4.6</td>\n",
 207         "      <td>101</td>\n",
 208         "      <td>Seven Senses of the Re'Union</td>\n",
 209         "      <td>0</td>\n",
 210         "      <td>2018</td>\n",
 211         "      <td>24</td>\n",
 212         "      <td>Action,Adventure,Animation</td>\n",
 213         "    </tr>\n",
 214         "  </tbody>\n",
 215         "</table>\n",
 216         "<p>130718 rows × 10 columns</p>\n",
 217         "</div>"
 218        ],
 219        "text/plain": [
 220         "        Unnamed: 0    titleId                              title  \\\n",
 221         "0                0  tt0111161           The Shawshank Redemption   \n",
 222         "1                1  tt0468569                    The Dark Knight   \n",
 223         "2                2  tt1375666                          Inception   \n",
 224         "3                3  tt0137523                         Fight Club   \n",
 225         "4                4  tt0110912                       Pulp Fiction   \n",
 226         "...            ...        ...                                ...   \n",
 227         "130713      130713  tt0062253             7 uomini e un cervello   \n",
 228         "130714      130714  tt0068885  La lunga cavalcata della vendetta   \n",
 229         "130715      130715  tt2583192                              Lucid   \n",
 230         "130716      130716  tt3899070                      Gone Tomorrow   \n",
 231         "130717      130717  tt8343748       Seven Senses of the Re'Union   \n",
 232         "\n",
 233         "        averageRating  numVotes                  primaryTitle  isAdult  \\\n",
 234         "0                 9.3   2405502      The Shawshank Redemption        0   \n",
 235         "1                 9.0   2365212               The Dark Knight        0   \n",
 236         "2                 8.8   2122723                     Inception        0   \n",
 237         "3                 8.8   1899050                    Fight Club        0   \n",
 238         "4                 8.9   1868911                  Pulp Fiction        0   \n",
 239         "...               ...       ...                           ...      ...   \n",
 240         "130713            4.6       101               Criminal Affair        0   \n",
 241         "130714            4.6       101               Deadly Trackers        0   \n",
 242         "130715            4.6       101                         Lucid        0   \n",
 243         "130716            4.6       101                 Gone Tomorrow        0   \n",
 244         "130717            4.6       101  Seven Senses of the Re'Union        0   \n",
 245         "\n",
 246         "       startYear runtimeMinutes                      genres  \n",
 247         "0           1994            142                       Drama  \n",
 248         "1           2008            152          Action,Crime,Drama  \n",
 249         "2           2010            148     Action,Adventure,Sci-Fi  \n",
 250         "3           1999            139                       Drama  \n",
 251         "4           1994            154                 Crime,Drama  \n",
 252         "...          ...            ...                         ...  \n",
 253         "130713      1968            106                Comedy,Crime  \n",
 254         "130714      1972             92               Drama,Western  \n",
 255         "130715      2013             87       Drama,Horror,Thriller  \n",
 256         "130716      2015             90         Crime,Drama,Mystery  \n",
 257         "130717      2018             24  Action,Adventure,Animation  \n",
 258         "\n",
 259         "[130718 rows x 10 columns]"
 260        ]
 261       },
 262       "execution_count": 3,
 263       "metadata": {},
 264       "output_type": "execute_result"
 265      }
 266     ],
 267     "source": [
 268      "data"
 269     ]
 270    },
 271    {
 272     "cell_type": "code",
 273     "execution_count": 4,
 274     "id": "3437c9b7",
 275     "metadata": {},
 276     "outputs": [],
 277     "source": [
 278      "import numpy as np\n",
 279      "import requests as req\n",
 280      "from bs4 import BeautifulSoup"
 281     ]
 282    },
 283    {
 284     "cell_type": "code",
 285     "execution_count": null,
 286     "id": "16d08cdf",
 287     "metadata": {},
 288     "outputs": [],
 289     "source": []
 290    },
 291    {
 292     "cell_type": "code",
 293     "execution_count": 5,
 294     "id": "4105e803",
 295     "metadata": {},
 296     "outputs": [
 297      {
 298       "name": "stdout",
 299       "output_type": "stream",
 300       "text": [
 301        "1\n",
 302        "2\n",
 303        "3\n",
 304        "4\n",
 305        "5\n",
 306        "6\n",
 307        "zz7\n",
 308        "8\n",
 309        "9\n",
 310        "10\n",
 311        "11\n",
 312        "12\n",
 313        "13\n",
 314        "zz14\n",
 315        "15\n",
 316        "16\n",
 317        "17\n",
 318        "18\n",
 319        "19\n",
 320        "20\n",
 321        "21\n",
 322        "22\n",
 323        "23\n",
 324        "24\n",
 325        "25\n",
 326        "26\n",
 327        "27\n",
 328        "28\n",
 329        "29\n",
 330        "30\n",
 331        "31\n",
 332        "32\n",
 333        "33\n",
 334        "34\n",
 335        "35\n",
 336        "36\n",
 337        "37\n",
 338        "38\n",
 339        "39\n",
 340        "40\n",
 341        "41\n",
 342        "42\n",
 343        "43\n",
 344        "44\n",
 345        "45\n",
 346        "46\n",
 347        "47\n",
 348        "48\n",
 349        "49\n",
 350        "50\n",
 351        "51\n",
 352        "52\n",
 353        "53\n",
 354        "54\n",
 355        "55\n",
 356        "56\n",
 357        "57\n",
 358        "58\n",
 359        "59\n",
 360        "60\n",
 361        "61\n",
 362        "62\n",
 363        "63\n",
 364        "64\n",
 365        "65\n",
 366        "66\n",
 367        "67\n",
 368        "68\n",
 369        "69\n",
 370        "70\n",
 371        "zz71\n",
 372        "72\n",
 373        "73\n",
 374        "zz74\n",
 375        "zz75\n",
 376        "76\n",
 377        "77\n",
 378        "78\n",
 379        "zz79\n",
 380        "80\n",
 381        "81\n",
 382        "82\n",
 383        "83\n",
 384        "84\n",
 385        "85\n",
 386        "86\n",
 387        "87\n",
 388        "88\n",
 389        "89\n",
 390        "90\n",
 391        "91\n",
 392        "92\n",
 393        "93\n",
 394        "94\n",
 395        "95\n",
 396        "96\n",
 397        "97\n",
 398        "98\n",
 399        "99\n",
 400        "100\n",
 401        "101\n",
 402        "102\n",
 403        "103\n",
 404        "104\n",
 405        "105\n",
 406        "106\n",
 407        "107\n",
 408        "zz108\n",
 409        "109\n",
 410        "110\n",
 411        "111\n",
 412        "112\n",
 413        "113\n",
 414        "114\n",
 415        "115\n",
 416        "116\n",
 417        "117\n",
 418        "118\n",
 419        "119\n",
 420        "120\n",
 421        "121\n",
 422        "122\n",
 423        "123\n",
 424        "124\n",
 425        "125\n",
 426        "126\n",
 427        "127\n",
 428        "128\n",
 429        "129\n",
 430        "130\n",
 431        "131\n",
 432        "132\n",
 433        "133\n",
 434        "134\n",
 435        "135\n",
 436        "136\n",
 437        "zz137\n",
 438        "138\n",
 439        "139\n",
 440        "140\n",
 441        "141\n",
 442        "142\n",
 443        "143\n",
 444        "144\n",
 445        "145\n",
 446        "146\n",
 447        "147\n",
 448        "148\n",
 449        "149\n",
 450        "150\n",
 451        "151\n",
 452        "152\n",
 453        "153\n",
 454        "154\n",
 455        "155\n",
 456        "156\n",
 457        "157\n",
 458        "158\n",
 459        "159\n",
 460        "160\n",
 461        "zz161\n",
 462        "162\n",
 463        "163\n",
 464        "164\n",
 465        "165\n",
 466        "166\n",
 467        "167\n",
 468        "168\n",
 469        "169\n",
 470        "170\n",
 471        "171\n",
 472        "172\n",
 473        "173\n",
 474        "174\n",
 475        "175\n",
 476        "176\n",
 477        "177\n",
 478        "178\n",
 479        "179\n",
 480        "180\n",
 481        "181\n",
 482        "182\n",
 483        "183\n",
 484        "184\n",
 485        "185\n",
 486        "186\n",
 487        "187\n",
 488        "188\n",
 489        "189\n",
 490        "190\n",
 491        "191\n",
 492        "192\n",
 493        "zz193\n",
 494        "194\n",
 495        "195\n",
 496        "196\n",
 497        "197\n",
 498        "198\n",
 499        "199\n",
 500        "200\n",
 501        "201\n",
 502        "202\n",
 503        "203\n",
 504        "204\n",
 505        "205\n",
 506        "206\n",
 507        "207\n",
 508        "208\n",
 509        "209\n",
 510        "210\n",
 511        "211\n",
 512        "212\n",
 513        "213\n",
 514        "214\n",
 515        "215\n",
 516        "216\n",
 517        "217\n",
 518        "218\n",
 519        "219\n",
 520        "220\n",
 521        "221\n",
 522        "222\n",
 523        "223\n",
 524        "224\n",
 525        "225\n",
 526        "226\n",
 527        "227\n",
 528        "228\n",
 529        "229\n",
 530        "230\n",
 531        "231\n",
 532        "232\n",
 533        "233\n",
 534        "234\n",
 535        "235\n",
 536        "236\n",
 537        "237\n",
 538        "zz238\n",
 539        "239\n",
 540        "240\n",
 541        "241\n",
 542        "242\n",
 543        "243\n",
 544        "zz244\n",
 545        "245\n",
 546        "246\n",
 547        "247\n",
 548        "248\n",
 549        "249\n",
 550        "250\n",
 551        "251\n",
 552        "252\n",
 553        "253\n",
 554        "254\n",
 555        "255\n",
 556        "256\n",
 557        "257\n",
 558        "258\n",
 559        "259\n",
 560        "260\n",
 561        "zz261\n",
 562        "262\n",
 563        "263\n",
 564        "264\n",
 565        "265\n",
 566        "266\n",
 567        "267\n",
 568        "268\n",
 569        "269\n",
 570        "270\n",
 571        "zz271\n",
 572        "272\n",
 573        "273\n",
 574        "274\n",
 575        "275\n",
 576        "276\n",
 577        "277\n",
 578        "278\n",
 579        "279\n",
 580        "280\n",
 581        "281\n",
 582        "zz282\n",
 583        "283\n",
 584        "284\n",
 585        "285\n",
 586        "286\n",
 587        "287\n",
 588        "288\n",
 589        "289\n",
 590        "290\n",
 591        "291\n",
 592        "292\n",
 593        "293\n",
 594        "294\n",
 595        "295\n",
 596        "296\n",
 597        "297\n",
 598        "298\n",
 599        "zz299\n",
 600        "300\n",
 601        "301\n",
 602        "302\n",
 603        "303\n",
 604        "304\n",
 605        "305\n",
 606        "306\n",
 607        "307\n",
 608        "308\n",
 609        "309\n",
 610        "310\n",
 611        "zz311\n",
 612        "312\n",
 613        "zz313\n",
 614        "314\n",
 615        "315\n",
 616        "316\n",
 617        "317\n",
 618        "318\n",
 619        "319\n",
 620        "320\n",
 621        "321\n",
 622        "322\n",
 623        "323\n",
 624        "324\n",
 625        "325\n",
 626        "326\n",
 627        "327\n",
 628        "328\n",
 629        "329\n",
 630        "330\n",
 631        "331\n",
 632        "332\n",
 633        "333\n",
 634        "334\n",
 635        "335\n",
 636        "336\n",
 637        "337\n",
 638        "338\n",
 639        "zz339\n",
 640        "340\n",
 641        "341\n",
 642        "342\n",
 643        "343\n",
 644        "344\n",
 645        "345\n",
 646        "346\n",
 647        "347\n",
 648        "348\n",
 649        "349\n",
 650        "350\n",
 651        "351\n",
 652        "352\n",
 653        "353\n",
 654        "354\n",
 655        "zz355\n",
 656        "356\n",
 657        "357\n",
 658        "358\n",
 659        "359\n",
 660        "360\n",
 661        "361\n",
 662        "362\n",
 663        "363\n",
 664        "364\n",
 665        "365\n",
 666        "366\n",
 667        "367\n",
 668        "368\n",
 669        "zz369\n",
 670        "370\n",
 671        "371\n",
 672        "372\n",
 673        "373\n",
 674        "374\n",
 675        "zz375\n",
 676        "376\n",
 677        "377\n",
 678        "378\n",
 679        "379\n",
 680        "380\n",
 681        "381\n",
 682        "382\n",
 683        "383\n",
 684        "384\n",
 685        "385\n",
 686        "386\n",
 687        "zz387\n",
 688        "388\n",
 689        "389\n",
 690        "390\n",
 691        "391\n",
 692        "392\n",
 693        "393\n",
 694        "394\n",
 695        "395\n",
 696        "396\n",
 697        "397\n",
 698        "398\n",
 699        "399\n",
 700        "400\n",
 701        "401\n",
 702        "402\n",
 703        "403\n",
 704        "404\n",
 705        "405\n",
 706        "406\n",
 707        "407\n",
 708        "408\n",
 709        "zz409\n",
 710        "410\n",
 711        "411\n",
 712        "412\n",
 713        "413\n",
 714        "414\n",
 715        "415\n",
 716        "416\n",
 717        "417\n",
 718        "418\n",
 719        "419\n",
 720        "420\n",
 721        "421\n",
 722        "422\n",
 723        "423\n",
 724        "424\n",
 725        "zz425\n",
 726        "zz426\n",
 727        "427\n",
 728        "zz428\n",
 729        "zz429\n",
 730        "430\n",
 731        "zz431\n",
 732        "432\n",
 733        "433\n",
 734        "434\n",
 735        "435\n",
 736        "436\n",
 737        "437\n",
 738        "438\n",
 739        "439\n",
 740        "440\n",
 741        "441\n",
 742        "442\n",
 743        "443\n",
 744        "444\n",
 745        "445\n",
 746        "446\n",
 747        "447\n",
 748        "448\n",
 749        "449\n",
 750        "450\n",
 751        "451\n",
 752        "452\n",
 753        "453\n",
 754        "454\n",
 755        "455\n",
 756        "456\n",
 757        "457\n",
 758        "458\n",
 759        "459\n",
 760        "460\n",
 761        "461\n",
 762        "462\n",
 763        "463\n",
 764        "464\n",
 765        "465\n",
 766        "466\n",
 767        "467\n",
 768        "468\n",
 769        "469\n",
 770        "470\n",
 771        "471\n",
 772        "472\n",
 773        "473\n",
 774        "474\n",
 775        "475\n",
 776        "476\n",
 777        "477\n",
 778        "478\n",
 779        "479\n",
 780        "zz480\n",
 781        "481\n",
 782        "482\n",
 783        "zz483\n",
 784        "484\n",
 785        "485\n",
 786        "486\n",
 787        "487\n",
 788        "488\n",
 789        "489\n",
 790        "490\n",
 791        "zz491\n",
 792        "zz492\n",
 793        "493\n",
 794        "494\n",
 795        "495\n",
 796        "496\n",
 797        "497\n",
 798        "498\n",
 799        "499\n",
 800        "500\n",
 801        "501\n",
 802        "502\n",
 803        "503\n",
 804        "504\n",
 805        "zz505\n",
 806        "506\n",
 807        "507\n",
 808        "508\n",
 809        "509\n",
 810        "510\n",
 811        "511\n",
 812        "512\n",
 813        "513\n",
 814        "514\n",
 815        "515\n",
 816        "516\n",
 817        "zz517\n",
 818        "518\n",
 819        "519\n",
 820        "520\n",
 821        "521\n",
 822        "522\n",
 823        "zz523\n",
 824        "zz524\n",
 825        "525\n",
 826        "526\n",
 827        "zz527\n",
 828        "528\n",
 829        "529\n",
 830        "530\n",
 831        "531\n",
 832        "532\n",
 833        "533\n",
 834        "534\n",
 835        "535\n",
 836        "536\n",
 837        "537\n",
 838        "538\n",
 839        "539\n",
 840        "540\n",
 841        "541\n",
 842        "542\n",
 843        "543\n",
 844        "544\n",
 845        "zz545\n",
 846        "546\n",
 847        "547\n",
 848        "zz548\n",
 849        "549\n",
 850        "550\n",
 851        "551\n",
 852        "552\n",
 853        "553\n",
 854        "554\n",
 855        "555\n",
 856        "zz556\n",
 857        "557\n",
 858        "558\n",
 859        "559\n",
 860        "560\n",
 861        "561\n",
 862        "562\n",
 863        "zz563\n",
 864        "564\n",
 865        "565\n",
 866        "566\n",
 867        "567\n",
 868        "568\n",
 869        "569\n",
 870        "570\n",
 871        "571\n",
 872        "572\n",
 873        "573\n",
 874        "574\n",
 875        "zz575\n",
 876        "576\n",
 877        "577\n",
 878        "578\n",
 879        "579\n",
 880        "580\n",
 881        "581\n",
 882        "582\n",
 883        "583\n",
 884        "584\n",
 885        "585\n",
 886        "586\n",
 887        "587\n",
 888        "588\n",
 889        "589\n",
 890        "590\n",
 891        "591\n",
 892        "592\n",
 893        "593\n",
 894        "594\n",
 895        "595\n",
 896        "596\n",
 897        "597\n",
 898        "zz598\n",
 899        "599\n",
 900        "600\n",
 901        "601\n",
 902        "602\n",
 903        "603\n",
 904        "604\n",
 905        "605\n",
 906        "606\n",
 907        "607\n",
 908        "608\n",
 909        "609\n",
 910        "zz610\n",
 911        "611\n",
 912        "612\n",
 913        "613\n",
 914        "614\n",
 915        "zz615\n",
 916        "616\n",
 917        "617\n",
 918        "618\n",
 919        "619\n",
 920        "620\n",
 921        "621\n",
 922        "622\n",
 923        "623\n",
 924        "624\n",
 925        "625\n",
 926        "626\n",
 927        "627\n",
 928        "628\n",
 929        "629\n",
 930        "630\n",
 931        "631\n"
 932       ]
 933      },
 934      {
 935       "ename": "KeyboardInterrupt",
 936       "evalue": "",
 937       "output_type": "error",
 938       "traceback": [
 939        "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
 940        "\u001b[1;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
 941        "\u001b[1;32m<ipython-input-5-768a82e690ef>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      6\u001b[0m     \u001b[0mcontent\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      7\u001b[0m     \u001b[0mr\u001b[0m\u001b[1;33m=\u001b[0m \u001b[0mreq\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'https://www.imdb.com/title/'\u001b[0m\u001b[1;33m+\u001b[0m\u001b[0mi\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 8\u001b[1;33m     \u001b[0msoup\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mBeautifulSoup\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcontent\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'html5lib'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      9\u001b[0m     \u001b[0mr\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcookies\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mclear\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     10\u001b[0m     \u001b[0mrows\u001b[0m\u001b[1;33m=\u001b[0m \u001b[0msoup\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfind_all\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mclass_\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'ipc-metadata-list-item__list-content-item'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 942        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\bs4\\__init__.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, markup, features, builder, parse_only, from_encoding, exclude_encodings, element_classes, **kwargs)\u001b[0m\n\u001b[0;32m    346\u001b[0m             \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreset\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    347\u001b[0m             \u001b[1;32mtry\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 348\u001b[1;33m                 \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_feed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    349\u001b[0m                 \u001b[0msuccess\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    350\u001b[0m                 \u001b[1;32mbreak\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 943        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\bs4\\__init__.py\u001b[0m in \u001b[0;36m_feed\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m    432\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbuilder\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreset\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    433\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 434\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mbuilder\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfeed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mmarkup\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    435\u001b[0m         \u001b[1;31m# Close out any unfinished strings and close all the open tags.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    436\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mendData\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 944        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\bs4\\builder\\_html5lib.py\u001b[0m in \u001b[0;36mfeed\u001b[1;34m(self, markup)\u001b[0m\n\u001b[0;32m     85\u001b[0m             \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     86\u001b[0m                 \u001b[0mextra_kwargs\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'encoding'\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0muser_specified_encoding\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 87\u001b[1;33m         \u001b[0mdoc\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mparser\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparse\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mmarkup\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mextra_kwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     88\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     89\u001b[0m         \u001b[1;31m# Set the character encoding detected by the tokenizer.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 945        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\html5lib\\html5parser.py\u001b[0m in \u001b[0;36mparse\u001b[1;34m(self, stream, *args, **kwargs)\u001b[0m\n\u001b[0;32m    282\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    283\u001b[0m         \"\"\"\n\u001b[1;32m--> 284\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_parse\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstream\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m*\u001b[0m\u001b[0margs\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    285\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtree\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mgetDocument\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    286\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
 946        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\html5lib\\html5parser.py\u001b[0m in \u001b[0;36m_parse\u001b[1;34m(self, stream, innerHTML, container, scripting, **kwargs)\u001b[0m\n\u001b[0;32m    127\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcontainer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mcontainer\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    128\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mscripting\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mscripting\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 129\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mtokenizer\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0m_tokenizer\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mHTMLTokenizer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstream\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparser\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    130\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mreset\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    131\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
 947        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\html5lib\\_tokenizer.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, stream, parser, **kwargs)\u001b[0m\n\u001b[0;32m     40\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstream\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mparser\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     41\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 42\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstream\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mHTMLInputStream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstream\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     43\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mparser\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mparser\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     44\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
 948        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\html5lib\\_inputstream.py\u001b[0m in \u001b[0;36mHTMLInputStream\u001b[1;34m(source, **kwargs)\u001b[0m\n\u001b[0;32m    143\u001b[0m         \u001b[1;32mreturn\u001b[0m \u001b[0mHTMLUnicodeInputStream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msource\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    144\u001b[0m     \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 145\u001b[1;33m         \u001b[1;32mreturn\u001b[0m \u001b[0mHTMLBinaryInputStream\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0msource\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;33m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    146\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    147\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
 949        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\html5lib\\_inputstream.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, source, override_encoding, transport_encoding, same_origin_parent_encoding, likely_encoding, default_encoding, useChardet)\u001b[0m\n\u001b[0;32m    420\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    421\u001b[0m         \u001b[1;31m# Determine encoding\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 422\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcharEncoding\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdetermineEncoding\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0museChardet\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    423\u001b[0m         \u001b[1;32massert\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcharEncoding\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m]\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    424\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
 950        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\html5lib\\_inputstream.py\u001b[0m in \u001b[0;36mdetermineEncoding\u001b[1;34m(self, chardet)\u001b[0m\n\u001b[0;32m    496\u001b[0m                         \u001b[1;32mbreak\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    497\u001b[0m                     \u001b[0mbuffers\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbuffer\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 498\u001b[1;33m                     \u001b[0mdetector\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfeed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbuffer\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    499\u001b[0m                 \u001b[0mdetector\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mclose\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    500\u001b[0m                 \u001b[0mencoding\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mlookupEncoding\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdetector\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;34m'encoding'\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 951        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\chardet\\universaldetector.py\u001b[0m in \u001b[0;36mfeed\u001b[1;34m(self, byte_str)\u001b[0m\n\u001b[0;32m    209\u001b[0m                 \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_charset_probers\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mLatin1Prober\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    210\u001b[0m             \u001b[1;32mfor\u001b[0m \u001b[0mprober\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_charset_probers\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 211\u001b[1;33m                 \u001b[1;32mif\u001b[0m \u001b[0mprober\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfeed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbyte_str\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0mProbingState\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mFOUND_IT\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    212\u001b[0m                     self.result = {'encoding': prober.charset_name,\n\u001b[0;32m    213\u001b[0m                                    \u001b[1;34m'confidence'\u001b[0m\u001b[1;33m:\u001b[0m \u001b[0mprober\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_confidence\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 952        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\chardet\\charsetgroupprober.py\u001b[0m in \u001b[0;36mfeed\u001b[1;34m(self, byte_str)\u001b[0m\n\u001b[0;32m     69\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mprober\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mactive\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     70\u001b[0m                 \u001b[1;32mcontinue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 71\u001b[1;33m             \u001b[0mstate\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mprober\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfeed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbyte_str\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     72\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mstate\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     73\u001b[0m                 \u001b[1;32mcontinue\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 953        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\chardet\\sbcharsetprober.py\u001b[0m in \u001b[0;36mfeed\u001b[1;34m(self, byte_str)\u001b[0m\n\u001b[0;32m     90\u001b[0m         \u001b[1;31m# TODO: Make filter_international_words keep things in self.alphabet\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     91\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_model\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mkeep_ascii_letters\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 92\u001b[1;33m             \u001b[0mbyte_str\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfilter_international_words\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mbyte_str\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     93\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mbyte_str\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     94\u001b[0m             \u001b[1;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstate\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 954        "\u001b[1;32m~\\anaconda3\\lib\\site-packages\\chardet\\charsetprober.py\u001b[0m in \u001b[0;36mfilter_international_words\u001b[1;34m(buf)\u001b[0m\n\u001b[0;32m     84\u001b[0m         \u001b[1;31m# international character. The word may include one marker character at\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     85\u001b[0m         \u001b[1;31m# the end.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 86\u001b[1;33m         words = re.findall(b'[a-zA-Z]*[\\x80-\\xFF]+[a-zA-Z]*[^a-zA-Z\\x80-\\xFF]?',\n\u001b[0m\u001b[0;32m     87\u001b[0m                            buf)\n\u001b[0;32m     88\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n",
 955        "\u001b[1;32m~\\anaconda3\\lib\\re.py\u001b[0m in \u001b[0;36mfindall\u001b[1;34m(pattern, string, flags)\u001b[0m\n\u001b[0;32m    239\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    240\u001b[0m     Empty matches are included in the result.\"\"\"\n\u001b[1;32m--> 241\u001b[1;33m     \u001b[1;32mreturn\u001b[0m \u001b[0m_compile\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfindall\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstring\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    242\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    243\u001b[0m \u001b[1;32mdef\u001b[0m \u001b[0mfinditer\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mpattern\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstring\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mflags\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m0\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
 956        "\u001b[1;31mKeyboardInterrupt\u001b[0m: "
 957       ]
 958      }
 959     ],
 960     "source": [
 961      "directors=[]\n",
 962      "writer_actor=[]\n",
 963      "earned=[]\n",
 964      "j=1\n",
 965      "for i in data.titleId:\n",
 966      "    content=[]\n",
 967      "    r= req.get('https://www.imdb.com/title/'+i)\n",
 968      "    soup=BeautifulSoup(r.content, 'html5lib')\n",
 969      "    r.cookies.clear()\n",
 970      "    rows= soup.find_all(class_='ipc-metadata-list-item__list-content-item')\n",
 971      "    if len(rows)>1:\n",
 972      "        for i in rows:\n",
 973      "            content.append(i.get_text().strip())\n",
 974      "        directors.append(content[0].strip())\n",
 975      "        writer_actor.append(list(set(content[1:10])))\n",
 976      "        nums=[]\n",
 977      "        for i in content[-15:]:\n",
 978      "            \n",
 979      "            num= i.replace(',','').replace('$','').replace('(estimated)','')\n",
 980      "            try:\n",
 981      "                nums.append(int(num))\n",
 982      "            except:\n",
 983      "                continue\n",
 984      "        \n",
 985      "        if len(nums) > 1:\n",
 986      "            print(j)\n",
 987      "            earned.append(max(nums))\n",
 988      "        else:\n",
 989      "            print('zz'+str(j))\n",
 990      "            earned.append('NaN')\n",
 991      "           \n",
 992      "    else:\n",
 993      "        print('z'+str(j))\n",
 994      "        directors.append(np.nan)\n",
 995      "        writer_actor.append(np.nan)\n",
 996      "    j+=1"
 997     ]
 998    },
 999    {
1000     "cell_type": "code",
1001     "execution_count": null,
1002     "id": "8d8a9d77",
1003     "metadata": {},
1004     "outputs": [],
1005     "source": []
1006    },
1007    {
1008     "cell_type": "code",
1009     "execution_count": null,
1010     "id": "10d5adb7",
1011     "metadata": {},
1012     "outputs": [],
1013     "source": []
1014    },
1015    {
1016     "cell_type": "code",
1017     "execution_count": 6,
1018     "id": "2cfa1e5d",
1019     "metadata": {},
1020     "outputs": [],
1021     "source": [
1022      "directors=pd.DataFrame(directors)\n",
1023      "writer_actor= pd.DataFrame(writer_actor)"
1024     ]
1025    },
1026    {
1027     "cell_type": "code",
1028     "execution_count": 7,
1029     "id": "836f83c9",
1030     "metadata": {},
1031     "outputs": [],
1032     "source": [
1033      "directors.to_csv('directors.tsv', sep='\\t')\n",
1034      "writer_actor.to_csv('writer_actor.tsv', sep= '\\t')"
1035     ]
1036    },
1037    {
1038     "cell_type": "code",
1039     "execution_count": null,
1040     "id": "5a5fdd45",
1041     "metadata": {},
1042     "outputs": [],
1043     "source": []
1044    }
1045   ],
1046   "metadata": {
1047    "kernelspec": {
1048     "display_name": "Python 3",
1049     "language": "python",
1050     "name": "python3"
1051    }
1052   },
1053   "nbformat": 4,
1054   "nbformat_minor": 5
1055  }
1056