From c3227c33f56b3add469298896e869b53416d8795 Mon Sep 17 00:00:00 2001 From: Tobias Gruetzmacher Date: Sat, 9 Jan 2021 20:33:36 +0100 Subject: [PATCH] Fix WebToons cookies --- dosagelib/plugins/webtoons.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dosagelib/plugins/webtoons.py b/dosagelib/plugins/webtoons.py index b1609224d..08cd75650 100644 --- a/dosagelib/plugins/webtoons.py +++ b/dosagelib/plugins/webtoons.py @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MIT -# Copyright (C) 2019-2020 Tobias Gruetzmacher +# Copyright (C) 2019-2021 Tobias Gruetzmacher # Copyright (C) 2019-2020 Daniel Ring from ..scraper import _ParserScraper @@ -19,8 +19,9 @@ class WebToons(_ParserScraper): self.firstStripUrl = self.stripUrl % '1' def starter(self): - # Set age-check cookie - self.session.cookies.set('ageGatePass', 'true', domain='webtoons.com') + # Avoid age/GDPR gate + for cookie in ('needGDPR', 'needCCPA', 'needCOPPA'): + self.session.cookies.set(cookie, 'false', domain='webtoons.com') # Find current episode number listPage = self.getPage(self.listUrl) currentEpisode = listPage.xpath('//div[@class="detail_lst"]/ul/li')[0].attrib['data-episode-no']