def Title(self): title = KinopoiskAPI.getTitle(self) if title is not None: return title title = TheTVDBAPI.getTitle(self) if title is not None: return title d = self.data() if d is not None: try: return d.get('ruTitle', None) except AttributeError: pass return None
def __init__(self, info, settings=None): Informer.__init__(self) self._dict = dict() self.api_info = None for item in soap4me_data.api_data: if item['title'] == info['originaltitle']: self.api_info = item break self.episodes_data = get_api_request('https://api.soap4.me/v2/episodes/' + str(self.api_info['sid']) + '/') from movieapi import KinopoiskAPI kp_url = KinopoiskAPI.make_url_by_id(self.kp_id) self.settings = settings self.make_movie_api(self.imdb_id, kp_url, self.settings) self.tvshow_api = TVShowAPI.get_by(info['originaltitle'], self.api_info['title_ru'], self.imdb_id, kp_url) self.OK = self.parse(self.api_info)
def __init__(self, title, ruTitle, imdbId=None, kinopoiskId=None): TheTVDBAPI.__init__(self, imdbId) MyShowsAPI.__init__(self, title, ruTitle, imdbId, kinopoiskId) KinopoiskAPI.__init__(self, kinopoiskId)