简体   繁体   中英

Python Requests Library can't read URL

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM