Example #1
0
    def movie(self, imdb, title, localtitle, aliases, year):
        try:
            header = justwatch.get_head()
            payload = justwatch.get_payload(localtitle, ["movie"],
                                            ["flatrate"], ["nfx"])

            req = requests.post(self.api, headers=header, json=payload)
            data = req.json()

            offer = justwatch.get_offer(data['items'], year, title, localtitle,
                                        self.provider_id)

            if offer:
                nfx_id = str(offer[0]['urls']['standard_web']).split('/')[-1]
                return nfx_id, 'API Justwatch'

        except:
            try:
                url = "http://api.vodster.de/avogler/links.php?api_key=%s&format=json&imdb=%s" % (
                    self.vodster_api_key, imdb)
                nfx_id = self.get_netflix_id(url)
                return nfx_id, 'API Vodster'

            except:
                return
Example #2
0
    def movie(self, imdb, title, localtitle, aliases, year):
        try:
            header = justwatch.get_head()
            payload = justwatch.get_payload(localtitle, ["movie"], ["ads","free"], ["ntz"])

            req = requests.post(self.api, headers=header, json=payload)
            data = req.json()

            offer = justwatch.get_offer(data['items'], year, title, localtitle, self.provider_id)

            if offer:
                link = self.__search([localtitle] + source_utils.aliases_to_array(aliases), imdb, year)
                if not link and title != localtitle: link = self.__search([title] + source_utils.aliases_to_array(aliases), imdb, year)

                return link
        except:
            return
Example #3
0
    def movie(self, imdb, title, localtitle, aliases, year):
        try:

            header = justwatch.get_head()
            payload = justwatch.get_payload(localtitle, ["movie"],
                                            ["ads", "free"], ["wbx"])

            req = requests.post(self.api, headers=header, json=payload)
            data = req.json()

            offer = justwatch.get_offer(data['items'], year, title, localtitle,
                                        self.provider_id)

            if offer:
                url = offer[0]['urls']['standard_web']
                return url
        except:
            return