_html.py 350 B

123456789101112131415161718
  1. import requests
  2. """
  3. This module contains methods to retrieve pages
  4. """
  5. def get_page(this_url):
  6. """
  7. Simple utility gets the contents of a webpage
  8. @TODO Add Try/Catch blocks. Handle http errors.
  9. :param this_url:
  10. :return:
  11. """
  12. print("Retrieving {}".format(this_url))
  13. data = requests.get(this_url)
  14. return data.text