Beispiel #1
0
 def ExportVideoList(self, url):
     xml = common.getFEED(url)
     tree = ElementTree.XML(xml)
     items = tree.findall('item')
     del tree
     for item in items:
         self.ExportVideo(item)
 def ExportVideoList(self, url):
     xml = common.getFEED(url)
     tree = ElementTree.XML(xml)
     items = tree.findall("item")
     del tree
     for item in items:
         self.ExportVideo(item)
 def ExportShowList(self, url, delay=0):
     xml = common.getFEED(url)
     tree = ElementTree.XML(xml)
     items = tree.findall("item")
     del tree
     for item in items:
         self.ExportShowMovie(item)
         xbmc.sleep(delay)
Beispiel #4
0
 def ExportShowList(self, url, delay=0):
     xml = common.getFEED(url)
     tree = ElementTree.XML(xml)
     items = tree.findall('item')
     del tree
     for item in items:
         self.ExportShowMovie(item)
         xbmc.sleep(delay)
 def ExportShow(self, show):
     data = show.find("data")
     # show_name = data.findtext('name')
     # directory = os.path.join(TV_SHOWS_PATH,self.cleanfilename(show_name))
     # self.CreateDirectory(directory)
     show_id = data.findtext("show_id")
     url = "http://m.hulu.com/menu/11674?show_id=" + show_id + "&dp_id=hulu&limit=2000&package_id=" + package_id
     xml = common.getFEED(url)
     tree = ElementTree.XML(xml)
     episodes = tree.findall("item")
     del tree
     for episode in episodes:
         self.ExportVideo(episode)
Beispiel #6
0
 def ExportShow(self, show):
     data = show.find('data')
     #show_name = data.findtext('name')
     #directory = os.path.join(TV_SHOWS_PATH,self.cleanfilename(show_name))
     #self.CreateDirectory(directory)
     show_id = data.findtext('show_id')
     url = 'http://m.hulu.com/menu/11674?show_id=' + show_id + '&dp_id=hulu&limit=2000&package_id=' + package_id
     xml = common.getFEED(url)
     tree = ElementTree.XML(xml)
     episodes = tree.findall('item')
     del tree
     for episode in episodes:
         self.ExportVideo(episode)
 def ExportShowList(self,url,delay=0):  
     xml_limit = 1
     sub_page = 1
     while xml_limit:
         xml=common.getFEED(url)
         tree = ElementTree.XML(xml)
         items = tree.findall('item')
         count = tree.find('count')
         print "Subscription page now "+str(sub_page)
         if count.text == '128':
             sub_page += 1
             url += '&page='+str(sub_page)
         else:
             xml_limit = 0
         del tree
         for item in items:
             self.ExportShowMovie(item)
             xbmc.sleep(delay)
    def ExportShow(self, show):
       data = show.find('data')
       show_name = data.findtext('name').encode('utf-8').strip()
       directory = os.path.join(TV_SHOWS_PATH,self.cleanfilename(show_name))
       nfo_fullpath = os.path.join(directory,'tvshow.nfo')

       if os.path.isfile(nfo_fullpath) == False:

         tvshowDetails = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n<tvshow>\n'
         try:
          tvshowDetails += '    <title>'+data.findtext('name').encode('utf-8').strip()+'</title>\n'
         except:
          tvshowDetails += '    <title>'+'</title>\n'

         try:
          tvshowDetails += '    <showtitle>'+data.findtext('name').encode('utf-8').strip()+'</showtitle>\n'
         except:
          tvshowDetails += '    <showtitle>'+'</showtitle>\n'

         try:
          tvshowDetails += '    <rating>'+data.findtext('rating').encode('utf-8').strip()+'</rating>\n'
         except:
          tvshowDetails += '    <rating>'+'</rating>\n'

         try:
          tvshowDetails += '    <thumb>'+"http://assets.hulu.com/shows/key_art_"+data.findtext('canonical_name').encode('utf-8').strip().replace('-','_')+".jpg"+'</thumb>\n'
         except:
          tvshowDetails += '    <thumb>'+'</thumb>\n'

         try:
          tvshowDetails += '    <fanart>\n         <thumb>'
          tvshowDetails += "http://assets.hulu.com/shows/key_art_"+data.findtext('canonical_name').encode('utf-8').strip().replace('-','_')+".jpg"
          tvshowDetails += '</thumb>\n    </fanart>\n'
         except:
          tvshowDetails += '    <fanart>'+'</fanart>\n'

         try:
          tvshowDetails += '    <plot>'+data.findtext('description').encode('utf-8').strip()+'</plot>\n'
         except:
          tvshowDetails += '    <plot>'+'</plot>\n'

         tvshowDetails += '    <genre>Hulu</genre>\n'

         try:
          tvshowDetails += '    <season>'+data.findtext('total_seasons_count').encode('utf-8').strip()+'</season>\n'
         except:
          tvshowDetails += '    <season>'+'</season>\n'

         try:
          tvshowDetails += '    <episode>'+data.findtext('full_episodes_count').encode('utf-8').strip()+'</episode>\n'
         except:
          tvshowDetails += '    <episode>'+'</episode>\n'
 
         tvshowDetails += '    <resume>\n        <position>0.000000</position>\n        <total>0.000000</total>\n    </resume>\n'

         tvshowDetails += '</tvshow>\n'
#         log( "tvshowDetails = "+tvshowDetails)
         self.CreateDirectory(directory)
         self.SaveFile( 'tvshow.nfo', tvshowDetails, directory)

       show_id = data.findtext('show_id')
       url = 'http://m.hulu.com/menu/11674?show_id='+show_id+'&dp_id=hulu&limit=2000&package_id='+package_id
       xml=common.getFEED(url)
       tree = ElementTree.XML(xml)
       episodes = tree.findall('item')        
       del tree
       for episode in episodes:
           self.ExportVideo(episode)
    def ExportShow(self, show):
        data = show.find('data')
        show_name = data.findtext('name').encode('utf-8').strip()
        directory = os.path.join(TV_SHOWS_PATH, self.cleanfilename(show_name))
        nfo_fullpath = os.path.join(directory, 'tvshow.nfo')

        if os.path.isfile(nfo_fullpath) == False:

            tvshowDetails = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>\n<tvshow>\n'
            try:
                tvshowDetails += '    <title>' + data.findtext('name').encode(
                    'utf-8').strip() + '</title>\n'
            except:
                tvshowDetails += '    <title>' + '</title>\n'

            try:
                tvshowDetails += '    <showtitle>' + data.findtext(
                    'name').encode('utf-8').strip() + '</showtitle>\n'
            except:
                tvshowDetails += '    <showtitle>' + '</showtitle>\n'

            try:
                tvshowDetails += '    <rating>' + data.findtext(
                    'rating').encode('utf-8').strip() + '</rating>\n'
            except:
                tvshowDetails += '    <rating>' + '</rating>\n'

            try:
                tvshowDetails += '    <thumb>' + "http://assets.hulu.com/shows/key_art_" + data.findtext(
                    'canonical_name').encode('utf-8').strip().replace(
                        '-', '_') + ".jpg" + '</thumb>\n'
            except:
                tvshowDetails += '    <thumb>' + '</thumb>\n'

            try:
                tvshowDetails += '    <fanart>\n         <thumb>'
                tvshowDetails += "http://assets.hulu.com/shows/key_art_" + data.findtext(
                    'canonical_name').encode('utf-8').strip().replace(
                        '-', '_') + ".jpg"
                tvshowDetails += '</thumb>\n    </fanart>\n'
            except:
                tvshowDetails += '    <fanart>' + '</fanart>\n'

            try:
                tvshowDetails += '    <plot>' + data.findtext(
                    'description').encode('utf-8').strip() + '</plot>\n'
            except:
                tvshowDetails += '    <plot>' + '</plot>\n'

            tvshowDetails += '    <genre>Hulu</genre>\n'

            try:
                tvshowDetails += '    <season>' + data.findtext(
                    'total_seasons_count').encode(
                        'utf-8').strip() + '</season>\n'
            except:
                tvshowDetails += '    <season>' + '</season>\n'

            try:
                tvshowDetails += '    <episode>' + data.findtext(
                    'full_episodes_count').encode(
                        'utf-8').strip() + '</episode>\n'
            except:
                tvshowDetails += '    <episode>' + '</episode>\n'

            tvshowDetails += '    <resume>\n        <position>0.000000</position>\n        <total>0.000000</total>\n    </resume>\n'

            tvshowDetails += '</tvshow>\n'
            #         log( "tvshowDetails = "+tvshowDetails)
            self.CreateDirectory(directory)
            self.SaveFile('tvshow.nfo', tvshowDetails, directory)

        show_id = data.findtext('show_id')
        url = 'http://m.hulu.com/menu/11674?show_id=' + show_id + '&dp_id=hulu&limit=2000&package_id=' + package_id
        xml = common.getFEED(url)
        tree = ElementTree.XML(xml)
        episodes = tree.findall('item')
        del tree
        for episode in episodes:
            self.ExportVideo(episode)