Exemple #1
0
    def scraper(self):
        # Fetch SourceCode
        url = u"http://metalvideo.com/relatedclips.php?vid=%(url)s" % plugin
        sourceObj = urlhandler.urlopen(url, 14400)  # TTL = 4 Hours

        # Set Content Properties
        self.set_sort_methods(self.sort_method_unsorted)

        # Fetch and Return VideoItems
        return self.xml_scraper(sourceObj)
Exemple #2
0
	def scraper(self):
		# Fetch SourceCode
		url = u"http://metalvideo.com/relatedclips.php?vid=%(url)s" % plugin
		sourceObj = urlhandler.urlopen(url, 14400) # TTL = 4 Hours
		
		# Set Content Properties
		self.set_sort_methods(self.sort_method_unsorted)
		
		# Fetch and Return VideoItems
		return self.xml_scraper(sourceObj)
Exemple #3
0
    def scraper(self):
        # Fetch Video Content
        url = BASEURL % plugin["url"]
        sourceObj = urlhandler.urlopen(url, 14400)  # TTL = 4 Hours
        videoItems = parsers.FeaturedParser().parse(sourceObj)
        sourceObj.close()

        # Set Content Properties
        if "sortby=views" in plugin["url"]:
            self.set_sort_methods(self.sort_method_program_count)
        else:
            self.set_sort_methods(self.sort_method_unsorted)

        # Return List of Video Listitems
        return videoItems
Exemple #4
0
	def scraper(self):
		_plugin = plugin
		# Fetch Sort Method and Crerate New Url
		if u"search.php" in _plugin["url"]: url = _plugin["url"]
		else:
			urlString = {u"0":u"%sdate.html", u"1":u"%sartist.html", u"2":u"%srating.html", u"3":u"%sviews.html"}[_plugin.getSetting("sort")]
			url = urlString % _plugin["url"]
		
		# Set Content Properties
		self.set_sort_methods(self.sort_method_unsorted)
		
		# Fetch SourceObj
		import parsers
		with urlhandler.urlopen(url, 14400) as sourceObj: # TTL = 4 Hours
			return parsers.VideosParser().parse(sourceObj)
Exemple #5
0
    def scraper(self):
        _plugin = plugin
        # Add Extra Items
        icon = (_plugin.getIcon(), 0)
        self.add_youtube_videos("UUhWOr1WxJ5UCqLFKPXk4pKA", hasPlaylist=False)
        self.add_item(_plugin.getuni(30101),
                      thumbnail=icon,
                      url={
                          "action": "Featured",
                          "url":
                          "featured.php?sortby=views&order=DESC&count=64"
                      })
        self.add_item(_plugin.getuni(30102),
                      thumbnail=icon,
                      url={
                          "action": "Featured",
                          "url":
                          "featured.php?sortby=rated&order=DESC&count=64"
                      })

        # Fetch Video Content
        url = BASEURL % "about/"
        with urlhandler.urlopen(url, 604800) as sourceObj:  # TTL = 1 Week
            return parsers.CartoonsParser().parse(sourceObj)
Exemple #6
0
    def scraper(self):
        _plugin = plugin
        # Fetch Sort Method and Crerate New Url
        # Fetch HTML Source
        if u"url" in _plugin:
            url = _plugin["url"]
        else:
            sortby = {
                u"0": u"date",
                u"1": u"artist",
                u"2": u"rating",
                u"3": u"views"
            }[_plugin.getSetting("sort")]
            #url = u"http://metalvideo.com/category.php?cat=%s&sortby=%s" % (_plugin["cat"], sortby)
            url = u"http://metalvideo.com/browse-%s-videos-1-%s.html" % (
                _plugin["cat"], sortby)

        # Set Content Properties
        self.set_sort_methods(self.sort_method_unsorted)

        # Fetch SourceObj
        import parsers
        with urlhandler.urlopen(url, 14400) as sourceObj:  # TTL = 4 Hours
            return parsers.VideosParser().parse(sourceObj)
Exemple #7
0
 def scraper(self):
     # Fetch Video Content
     url = BASEURL % plugin["url"]
     with urlhandler.urlopen(url, 14400) as sourceObj:  # TTL = 4 Hours
         return parsers.VideoParser().parse(sourceObj)
Exemple #8
0
 def scraper(self):
     import parsers
     with urlhandler.urlopen(plugin["url"],
                             600) as sourceObj:  # TTL = 10 Minutes
         return parsers.WatchingParser().parse(sourceObj)
Exemple #9
0
	def scraper(self):
		import parsers
		with urlhandler.urlopen(plugin["url"], 600) as sourceObj: # TTL = 10 Minutes
			return parsers.WatchingParser().parse(sourceObj)