Webtoons: Set ageGatePass cookie

This is only done via JavaScript, but seems to be required in some
regions to use the site.
This commit is contained in:
Tobias Gruetzmacher 2020-02-02 21:08:26 +01:00
parent 585cc7dc90
commit 932f5ba57b

View file

@ -22,6 +22,8 @@ class WebToons(_ParserScraper):
self.firstStripUrl = self.stripUrl % '1' self.firstStripUrl = self.stripUrl % '1'
def starter(self): def starter(self):
# Set age-check cookie
self.session.cookies.set('ageGatePass', 'true', domain='webtoons.com')
# Find current episode number # Find current episode number
listPage = self.getPage(self.listUrl) listPage = self.getPage(self.listUrl)
currentEpisode = listPage.xpath('//div[@class="detail_lst"]/ul/li')[0].attrib['data-episode-no'] currentEpisode = listPage.xpath('//div[@class="detail_lst"]/ul/li')[0].attrib['data-episode-no']