Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- from urllib.request import Request, urlopen
- import re
- req = Request("https://pastebin.com/")
- html_page = urlopen(req)
- soup = BeautifulSoup(html_page, "lxml")
- links = []
- for link in soup.findAll('a'):
- links.append(link.get('href'))
- print(links)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement