Skip to content

Instantly share code, notes, and snippets.

@aniruddha27
Created March 20, 2020 20:09
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 aniruddha27/f74d7c30a69484222b9ae051ef051a54 to your computer and use it in GitHub Desktop.
Save aniruddha27/f74d7c30a69484222b9ae051ef051a54 to your computer and use it in GitHub Desktop.
import requests
# url = "https://weather.com/en-IN/weather/tenday/l/aff9460b9160c73ff01769fd83ae82cf37cb27fb7eb73c70b91257d413147b69"
url = "https://en.wikipedia.org/wiki/Delhi"
# response object
resp = requests.get(url)
# using text attribute of the response object, return the HTML of webpage as string
text = resp.text
print(text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment