Beispiel #1
0
    def getRSSFeed(self, url):
        handlers = []

        if sickbeard.PROXY_SETTING:
            logger.log(u"Using global proxy for url: " + url, logger.DEBUG)
            scheme, address = urllib2.splittype(sickbeard.PROXY_SETTING)
            address = sickbeard.PROXY_SETTING if scheme else "http://" + sickbeard.PROXY_SETTING
            handlers = [urllib2.ProxyHandler({"http": address, "https": address})]
            self.provider.headers.update({"Referer": address})
        elif "Referer" in self.provider.headers:
            self.provider.headers.pop("Referer")

        return getFeed(url, request_headers=self.provider.headers, handlers=handlers)
Beispiel #2
0
    def getRSSFeed(self, url):
        handlers = []

        if sickbeard.PROXY_SETTING:
            logging.debug("Using global proxy for url: " + url)
            scheme, address = urllib2.splittype(sickbeard.PROXY_SETTING)
            address = sickbeard.PROXY_SETTING if scheme else 'http://' + sickbeard.PROXY_SETTING
            handlers = [urllib2.ProxyHandler({'http': address, 'https': address})]
            self.provider.headers.update({'Referer': address})
        elif 'Referer' in self.provider.headers:
            self.provider.headers.pop('Referer')

        return getFeed(url, request_headers=self.provider.headers, handlers=handlers)
Beispiel #3
0
    def getRSSFeed(self, url):
        handlers = []

        if sickbeard.PROXY_SETTING:
            logging.debug("Using global proxy for url: " + url)
            scheme, address = urllib2.splittype(sickbeard.PROXY_SETTING)
            address = sickbeard.PROXY_SETTING if scheme else 'http://' + sickbeard.PROXY_SETTING
            handlers = [urllib2.ProxyHandler({'http': address, 'https': address})]
            self.provider.headers.update({'Referer': address})
        elif 'Referer' in self.provider.headers:
            self.provider.headers.pop('Referer')

        return getFeed(url, request_headers=self.provider.headers, handlers=handlers)
Beispiel #4
0
 def get_rss_feed(self, url, params=None):
     if self.provider.login():
         return getFeed(url, params=params, request_hook=self.provider.get_url)
     return {'entries': []}
Beispiel #5
0
 def getRSSFeed(self, url, params=None):
     return getFeed(url, params=params, request_hook=self.provider.get_url)
Beispiel #6
0
 def getRSSFeed(self, url):
     return getFeed(url, request_hook=self.provider.get_url)