Exemplo n.º 1
0
def getMagnetLink(content):
  pattern = r'magnet:\?[0-9a-zA-Z=:&;./]+'
  magnetLink = re.findall(pattern, content)
  assert(len(magnetLink) == 1)
  return decodeXML(magnetLink[0])
Exemplo n.º 2
0
 def __init__(self, title, pubDate, link='', description='', fromId=0):
   self.fromFeedId = fromId
   self.title = decodeXML(title.strip())
   self.pubDate = time2Str(str2Time(pubDate))
   self.link = link
   self.description = description