0

My code is:

import requests

company_name_url('http://www.forbes.com/global2000/list/#page:3_sort:2_direction:asc_search:_filter:All%20industries_filter:All%20countries_filter:All%20states')

r = requests.get(company_name_url)

But it only open page 1 even when I change the page number in the url.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Soroush Ghodsi
  • 380
  • 1
  • 7
  • 19
  • 1
    The page is running some javascript. See [this question](http://stackoverflow.com/questions/26393231/using-python-requests-with-javascript-pages). – Peter Wood Dec 07 '14 at 21:54

1 Answers1

1

It looks like the issue is that the page first loads up with information before the third page query is made to the system (and the information displayed on the page is then updated as opposed to it loading the third page immediately with information). I'm not sure how to fix this with requests, but it looks like that is the source of your problem.

Nwilson
  • 121
  • 9