def get_providers(self): if not self.providers: soup_list = soup.get_html_soup(self.url, soup.links_with_nofollow_and_no_style_with_img) for provider in soup_list: domain, url = provider.contents[0].string.strip(), provider.attrs["href"] if not domain in self.providers: self.providers[domain] = Provider(domain) soup_list2 = soup.get_html_soup(url, soup.link_with_input_value) offsite_url = soup_list2[0].attrs["href"] self.providers[domain].urls.append(offsite_url) return self.providers
def get_episodes(self): if not self.episodes: soup_list = soup.get_html_soup(self.url, soup.link_with_next_sibling_string) for episode in soup_list: new_episode = Episode(episode.string, episode.attrs["href"]) self.episodes[new_episode.name] = new_episode return self.episodes
def get_shows(self): if not self.shows: soup_list = soup.get_html_soup(SHOWS, soup.list_of_links) for show in soup_list: new_show = Show(show.attrs["title"], show.attrs["href"]) self.shows[new_show.name] = new_show return self.shows
def get_seasons(self): if not self.seasons: soup_list = soup.get_html_soup(self.url, soup.list_of_links_all_seasons) for season in soup_list: new_season = Season(season.string, season.attrs["href"]) self.seasons[new_season.name] = new_season return self.seasons