Skip to content

Instantly share code, notes, and snippets.

@AnderRV
Created August 20, 2021 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnderRV/ababe91d84e3d5486c2294853b6db33a to your computer and use it in GitHub Desktop.
Save AnderRV/ababe91d84e3d5486c2294853b6db33a to your computer and use it in GitHub Desktop.
import random
chrome_linux_88 = {
# ...
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36',
}
chromium_linux_92 = {
# ...
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36',
}
firefox_linux_88 = {
# ...
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0',
}
headers = [
chrome_linux_88,
chromium_linux_92,
firefox_linux_88
]
def random_headers():
return random.choice(headers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment