Created
December 19, 2018 13:29
-
-
Save DonBattery/ed4eac22affa24cc53b4d6ba0dc771f4 to your computer and use it in GitHub Desktop.
Python3 script to get href from HTML file
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
import fileinput | |
import re | |
def process(line): | |
result = re.search('href="(.*)"', line) | |
if result: | |
print(result.group(1)) | |
for line in fileinput.input(): | |
process(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment