Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- import urllib
- page = urllib.urlopen('paste url here')
- soup = BeautifulSoup(page)
- zeug = soup.find('div', attrs={'class': 'fm_linkeSpalte'})
- content = zeug.get_text() # strip=True
- f = open('schulen.txt', 'a')
- f.write(content.encode('utf8'))
- f.write("\n\n\n_______________________\n\n\n")
- f.close()
- # print content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement