Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. import os
  4. import platform
  5. import urllib2
  6. from BeautifulSoup import BeautifulSoup
  7. 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","---"]
  8. url = "http://vertretung.steffend.de/Klassen_9e.htm"
  9. req = urllib2.Request(url)
  10. page = urllib2.urlopen(req)
  11. soup = BeautifulSoup(page)
  12. tables = soup.findChildren('table')
  13. my_table = tables[1]
  14. rows = my_table.findChildren(['tr'])
  15.  
  16. for row in rows:
  17.     cells = row.findChildren('td')
  18.     for cell in cells:
  19.         value = cell.text
  20.         print value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement