Last active
September 22, 2020 11:21
-
-
Save luckylittle/979ef0eb8d04e8f8b8c14984d3c9a86c to your computer and use it in GitHub Desktop.
Super easy hyperlink extractor for local HTML
This file contains 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 characters
#!/bin/python3 | |
from bs4 import BeautifulSoup | |
import os | |
file = open("audible.html", "r") | |
html_doc = file.read() | |
soup = BeautifulSoup(html_doc, 'html.parser') | |
for link in soup.find_all('a'): | |
print(link.get('href')) | |
file.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment