0

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

player0
  • 69,261
  • 8
  • 33
  • 67
kambi
  • 2,839
  • 7
  • 32
  • 52

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
  • 185
  • 1
  • 12