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.

1
  • 1
    The page is running some javascript. See this question. Commented Dec 7, 2014 at 21:54

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.