示例#1
0
 def summary(self):
     """parses the episode's summary from the episode's tvrage page"""
     try:
         page = _fetch(self.link).read()
         if not 'Click here to add a summary' in page:
             summary = parse_synopsis(page, cleanup='var addthis_config')
             return summary
     except Exception, e:
         print('Episode.summary: %s, %s' % (self, e))
示例#2
0
文件: api.py 项目: omegamike/mythbox
 def summary(self):
     """parses the episode's summary from the episode's tvrage page"""
     try:
         page = _fetch(self.link).read()
         if not 'Click here to add a summary' in page:
             summary = parse_synopsis(page, cleanup='var addthis_config')
             return summary
     except Exception, e:
         print('Episode.summary: %s, %s' % (self, e))
示例#3
0
 def synopsis(self):
     """scraps the synopsis from the show's tvrage page using a regular
     expression. This method might break when the page changes. unfortunatly
     the episode summary isnt available via one of the xml feeds"""
     try:
         page = _fetch(self.link).read()
         synopsis = parse_synopsis(page)
         return synopsis
     except Exception, e:
         print('Show.synopsis:urlopen: %s, %s' % (self, e))
示例#4
0
文件: api.py 项目: omegamike/mythbox
 def synopsis(self):
     """scraps the synopsis from the show's tvrage page using a regular
     expression. This method might break when the page changes. unfortunatly
     the episode summary isnt available via one of the xml feeds"""
     try:
         page = _fetch(self.link).read()
         synopsis = parse_synopsis(page)
         return synopsis
     except Exception, e:
         print('Show.synopsis:urlopen: %s, %s' % (self, e))
示例#5
0
 def recap(self):
     """parses the episode's recap text from the episode's tvrage recap
     page"""
     try:
         page = _fetch(self.recap_url).read()
         if not 'Click here to add a recap for' in page:
             recap = parse_synopsis(page,
                                    cleanup='Share this article with your'
                                    ' friends')
             return recap
     except Exception, e:
         print('Episode.recap:urlopen: %s, %s' % (self, e))
示例#6
0
文件: api.py 项目: omegamike/mythbox
 def recap(self):
     """parses the episode's recap text from the episode's tvrage recap
     page"""
     try:
         page = _fetch(self.recap_url).read()
         if not 'Click here to add a recap for' in page:
             recap = parse_synopsis(page,
                                    cleanup='Share this article with your'
                                    ' friends')
             return recap
     except Exception, e:
         print('Episode.recap:urlopen: %s, %s' % (self, e))