Last active
June 8, 2021 14:22
-
-
Save Hidenmy/115c640e94b985c4def32d72886ddfae to your computer and use it in GitHub Desktop.
requests trips
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0' | |
url = 'https://www.google.com/' | |
content = requests.get(url, headers={'User-Agent': USER_AGENT}).content | |
print(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment