Last active
June 1, 2021 20:31
-
-
Save Tomiwa-Ot/3fa6f50af5fdff677c8c17363f4c84b1 to your computer and use it in GitHub Desktop.
Revisions
-
Tomiwa-Ot revised this gist
Jun 1, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,9 @@ import hashlib import requests from bs4 import BeautifulSoup text = "" reqs = requests.get(url) soup = BeautifulSoup(reqs.text, 'lxml') for heading in soup.find_all("h3"): print(heading.name + ' ' + heading.text.strip()) -
Tomiwa-Ot created this gist
Jun 1, 2021 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ import hashlib from bs4 import BeautifulSoup text = "" soup = BeautifulSoup(reqs.text, 'lxml') for heading in soup.find_all("h3"): print(heading.name + ' ' + heading.text.strip()) text = heading.text.strip() text = hashlib.md5(text).hexdigest()