12345678910111213141516171819 |
- from seleniumwire import webdriver # Import from seleniumwire
- # Create a new instance of the Chrome driver
- driver = webdriver.Chrome()
- # Go to the Google home page
- driver.get('https://hhh.com.tw/cases/detail/d/12428/')
- # Access requests via the `requests` attribute
- for request in driver.requests:
- if request.response:
- if int(request.response.status_code)>=404:
- print(
- request.url,
- request.response.status_code,
- request.response.headers['Content-Type']
- )
- # else:
- # print(request.url)
|