Skip to content

Instantly share code, notes, and snippets.

@PSJoshi
Last active December 22, 2023 14:53
Show Gist options
  • Save PSJoshi/88ab9f5bb473b2be82798e6ba5412d14 to your computer and use it in GitHub Desktop.
Save PSJoshi/88ab9f5bb473b2be82798e6ba5412d14 to your computer and use it in GitHub Desktop.
Hash a web page
#!/usr/bin/env python
import requests
import hashlib
page_contents = requests.get('http://www.google.com')
response = page_contents.text
print hashlib.sha256(response.encode('utf-8')).hexdigest()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment