0

Is it possible to receive the status code of a URL with headless Chrome (python)?

player0
  • 124,011
  • 12
  • 67
  • 124
kambi
  • 3,291
  • 10
  • 37
  • 58

1 Answers1

0

As stated in this answer it's not possible using python and selenium (I guess you are using selenium?). A working alternative from selenium and chrome is requests. With requests an example would look like this:

import requests
response = requests.get('https://api.github.com')
print(response.status_code)
Abrogans
  • 179
  • 1
  • 13