def get_popular(self): names = [] query = quote("720p | 1080p | DVDRip") for page in range(Provider.PAGES_TO_FETCH): url = "https://thepiratebay.org/search/%s/%s/99/207" % (query, page) names += self.parse_html(url, ".detLink", cache=False) movies = [torrent_to_movie(name) for name in names] movies = remove_bad_torrent_matches(movies) return movies
def get_popular(self): names = [] base = "https://kickasstorrents.to/highres-movies/" # New mirrors can be found at https://thekickasstorrents.com/ for page in range(Provider.PAGES_TO_FETCH): if page == 0: url = base else: url = base + "%s/" % (page + 1) names += self.parse_html(url, "#mainSearchTable .data .cellMainLink", cache=False) movies = [torrent_to_movie(name) for name in names] movies = remove_bad_torrent_matches(movies) return movies
def main(arguments): APP.settings["DEBUG"] = arguments["--debug"] directory = arguments["<directory>"] filenames = get_filenames(directory) movies = [torrent_to_movie(name) for name in filenames] movies = remove_bad_torrent_matches(movies) update_moviedata(movies, APP) records = [] for movie in movies: data = APP.Movie.get_data(movie) if not data or data in records: continue records.append(data) output(records)