| 123456789101112131415161718 |
- import requests
- """
- This module contains methods to retrieve pages
- """
- def get_page(this_url):
- """
- Simple utility gets the contents of a webpage
- @TODO Add Try/Catch blocks. Handle http errors.
- :param this_url:
- :return:
- """
- headers = {'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36'}
- data = requests.get(this_url, headers=headers)
- return data.text
|