21 lines
563 B
Python
21 lines
563 B
Python
from bs4 import BeautifulSoup
|
|
import requests
|
|
|
|
with open('/Kalender/calender.html') as html_file:
|
|
soup = BeautifulSoup(html_file, 'lxml')
|
|
|
|
print(soup)
|
|
|
|
|
|
|
|
#source = requests.get ('http://www.fundraising-kalender.de').text
|
|
|
|
#soup = BeautifulSoup(source, 'lxml')
|
|
#for veranstaltung in soup.find_all('kalender-veranstaltung'):
|
|
# event = veranstaltung.find("kalender-termin").string.strip()
|
|
|
|
#with open('out.txt', 'w') as f:
|
|
# print >> f, 'Filename:', filename # Python 2.x
|
|
# print('Filename:', filename, file=f) # Python 3.x
|
|
|
|
#print(soup.prettify()) |