Last active
April 1, 2016 09:01
-
-
Save amarynets/4abb8255cc27b3cab8790a21024ccc92 to your computer and use it in GitHub Desktop.
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 urllib.request | |
import re | |
link = "https://habrahabr.ru/post/280644/" | |
website = urllib.request.urlopen(link) | |
html = website.read().decode() | |
links = re.findall('"((http|ftp)s?://.*?)"', html) | |
sorted(links) | |
for i in links: | |
print(i[0], end='\n') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
link - адреса сайту
links - список всіх ссилок сайту