How to get all the ajax requests after Python: uses selenium to request url

question:
after using selenium to request url ( https://www.toutiao.com/c/use.), the page will continue to initiate ajax requests to dynamically load data

the code is as follows:

    option = webdriver.ChromeOptions()
    option.add_argument("headless")
    option.add_argument("UTF-8")
    driver = webdriver.Chrome(chrome_options=option)
    driver.get(url="https://www.toutiao.com/c/user/60780927891/-sharpmid=1568070539599873")
    time.sleep(5)
    print(driver.title)
    driver.close()

excuse me: how can I get the url of subsequent ajax requests on this page?

Mar.09,2021

if you just want to know the url requested by ajax, grab the package with a tool such as fiddler.


has the landlord found a way?

Menu