All pastes #426120 Raw Edit

Something

public text v1 · immutable
·published 2007-04-05 22:25 UTC
rendered paste body
class WS0607_TI3_ASSIGNMENTS(ScrapedNFed.ScrapedFeed):
  def __init__(self):
    ScrapedNFed.ScrapedFeed.__init__(self, "ws0607_ti3_assignments.pickle")
    self.rssFile = "output_xml/ws0607_ti3_assignments.xml"
    self.link = "http://www-depreciated.inf.fu-berlin.de/inst/ag-tech/teaching/WS0607/19513-V/index.html"
    self.title = u"TI III: Betriebssysteme und Rechnernetze: Assignments"

  def HTML2RSS(self, headers, body):
    soup = BeautifulSoup.BeautifulSoup(body)
    for i in soup.findAll(href=re.compile("Uebung_Aufgaben")):
      yield self.encloseItem(PyRSS2Gen.RSSItem(
        title = i.string,
        link = urlparse.urljoin(self.link, i["href"]),
        description = i.string,
      ))