Skip to content

Instantly share code, notes, and snippets.

@DonBattery
Created December 19, 2018 13:29
Show Gist options
  • Save DonBattery/ed4eac22affa24cc53b4d6ba0dc771f4 to your computer and use it in GitHub Desktop.
Save DonBattery/ed4eac22affa24cc53b4d6ba0dc771f4 to your computer and use it in GitHub Desktop.
Python3 script to get href from HTML file
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