title: scraping web data using python
body: <p>I am trying to write a code for scraping data from the imdb top 250 web page. The code that I have written follows below. The code works and gives me my intended results. But the problem I am facing lies in the number of results the code is returning. When I use it on my laptop, it produces 23 results, the 1st 23 movies as listed by imdb. But when I run from one of my friend's, it produces proper 250 results. Why does this happen? What should be done in order to avoid this?</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import requests
  import sys
  from StringIO import StringIO
  
  try:
      import cPickle as pickle
  except:
      import pickle
  
  url = 'http://www.imdb.com/chart/top'
  
  response = requests.get(url)
  soup = BeautifulSoup(response.text)
  
  movies = soup.select('td.titleColumn')
  links = [a.attrs.get('href') for a in soup.select('td.titleColumn a')]
  crew = [a.attrs.get('title') for a in soup.select('td.titleColumn a')]
  ratings = [b.attrs.get('data-value') for b in soup.select('td.titleColumn span[name=ir]')]
  votes = [b.attrs.get('data-value') for b in soup.select('td.ratingColumn strong')]
  
  imdb = []
  
  print(len(movies))
  
  for index in range(0, len(movies)):
      data = {"movie": movies[index].get_text(),
              "link": links[index],
              "starCast": crew[index],
              "rating": ratings[index],
              "vote": votes[index]}
      imdb.append(data)
  
  print(imdb)
  
  
  Test Run from my laptop result :
  ['9.21', '9.176', '9.015', '8.935', '8.914', '8.903', '8.892', '8.889', '8.877', '8.817', '8.786', '8.76', '8.737', '8.733', '8.716', '8.703', '8.7', '8.69', '8.69', '8.678', '8.658', '8.629', '8.619']
  23
  </code></pre>