Last active
October 31, 2019 19:44
-
-
Save pourya2374/87fb661a12c210bd604519c98b11f4ef to your computer and use it in GitHub Desktop.
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 characters
from bs4 import BeautifulSoup | |
source = str(open('page_source.html', 'r').readlines()) | |
soup = BeautifulSoup(source, 'html.parser') | |
output = open('links.txt', 'w') | |
for a_tag in soup.find_all('a', string="DOWNLOAD"): | |
output.write(a_tag['href'] + '\n') | |
output.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment