def __init__(self, url, headless=True): Scraper.__init__( self, browser=Browser(headless=headless).browser, url=url, xpath_expressions={ 'total_episodes': '//a[@class="numbers"][last()]/text()' }, ) file_name = self.url_parts.path.split('/')[1] FileManager.__init__(self, folder_name=self.url_parts.netloc, file_name=f'{file_name}.json')
def __init__(self, url, headless=True): Scraper.__init__( self, browser=Browser(headless=headless).browser, url=url, xpath_expressions={ 'total_episodes': '//ul[@id="episodeList"]/li[@class="fa-play-circle"][1]/a/p/text()' }, ) FileManager.__init__( self, folder_name=self.url_parts.netloc, file_name=f'{self.url_parts.path.replace("/anime/", "")}.json')