Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- import os
- import platform
- import urllib2
- from BeautifulSoup import BeautifulSoup
- KLASSEN = ["5a","5b","5c","5d","5e","5f","6a","6b","6c","6d","6e","6f","7a","7b","7c","7d","7e","7f","8a","8b","8c","8d","8e","8f","9a","9b","9c","9d","9e","9f","10a","10b","10c","10d","10e","10f","11","ALLE","---"]
- url = "http://vertretung.steffend.de/Klassen_9e.htm"
- req = urllib2.Request(url)
- page = urllib2.urlopen(req)
- soup = BeautifulSoup(page)
- tables = soup.findChildren('table')
- my_table = tables[1]
- rows = my_table.findChildren(['tr'])
- for row in rows:
- cells = row.findChildren('td')
- for cell in cells:
- value = cell.text
- print value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement