Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class=’General’>
- <div class=’First class’>
- <a href=’links what I need’></a>
- </div>
- </div>
- import urllib.request
- from bs4 import BeautifulSoup
- html = urllib.request.urlopen('http://your/url')
- soup = BeautifulSoup(html, 'html.parser').find('div', class_='First-class')
- for i in soup.find_all('a'):
- print(i['href'])
- links what I need
- links what I
- links what
- links
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement