Remove webtoons auto-updater for now
This commit is contained in:
parent
ce16537ce6
commit
62bcc5212e
4 changed files with 6 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# Copyright (C) 2019-2021 Tobias Gruetzmacher
|
# Copyright (C) 2019-2022 Tobias Gruetzmacher
|
||||||
# Copyright (C) 2019-2020 Daniel Ring
|
# Copyright (C) 2019-2022 Daniel Ring
|
||||||
from ..scraper import _ParserScraper
|
from ..scraper import _ParserScraper
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,6 @@ class WebToons(_ParserScraper):
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls): # noqa: Allowed to be long
|
def getmodules(cls): # noqa: Allowed to be long
|
||||||
return (
|
return (
|
||||||
# START AUTOUPDATE
|
|
||||||
cls('1000', 'action/one-thousand', 1217),
|
cls('1000', 'action/one-thousand', 1217),
|
||||||
cls('10thDimensionBoys', 'comedy/10th-dimension-boys', 71),
|
cls('10thDimensionBoys', 'comedy/10th-dimension-boys', 71),
|
||||||
cls('1111Animals', 'comedy/1111-animals', 437),
|
cls('1111Animals', 'comedy/1111-animals', 437),
|
||||||
|
@ -450,5 +449,4 @@ class WebToons(_ParserScraper):
|
||||||
cls('YunaAndKawachan', 'drama/yuna-and-kawachan', 1840),
|
cls('YunaAndKawachan', 'drama/yuna-and-kawachan', 1840),
|
||||||
cls('ZeroGame', 'fantasy/zero-game', 1704),
|
cls('ZeroGame', 'fantasy/zero-game', 1704),
|
||||||
cls('ZomCom', 'challenge/zomcom', 70195),
|
cls('ZomCom', 'challenge/zomcom', 70195),
|
||||||
# END AUTOUPDATE
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2012-2014 Bastian Kleineidam
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
||||||
# Copyright (C) 2015-2020 Tobias Gruetzmacher
|
# Copyright (C) 2015-2022 Tobias Gruetzmacher
|
||||||
# Copyright (C) 2019-2020 Daniel Ring
|
# Copyright (C) 2019-2020 Daniel Ring
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
@ -9,7 +9,7 @@ d=$(dirname $0)
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
list="$*"
|
list="$*"
|
||||||
else
|
else
|
||||||
list="arcamax comicfury comicgenesis comicskingdom creators gocomics keenspot tapastic webcomicfactory webtoons"
|
list="arcamax comicfury comicgenesis comicskingdom creators gocomics keenspot tapastic webcomicfactory"
|
||||||
fi
|
fi
|
||||||
for script in $list; do
|
for script in $list; do
|
||||||
echo "Executing ${script}.py"
|
echo "Executing ${script}.py"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2012-2014 Bastian Kleineidam
|
# Copyright (C) 2012-2014 Bastian Kleineidam
|
||||||
# Copyright (C) 2015-2020 Tobias Gruetzmacher
|
# Copyright (C) 2015-2022 Tobias Gruetzmacher
|
||||||
# Copyright (C) 2019-2020 Daniel Ring
|
# Copyright (C) 2019-2020 Daniel Ring
|
||||||
set -e
|
set -e
|
||||||
set -u
|
set -u
|
||||||
|
@ -11,7 +11,7 @@ d=$(dirname $0)
|
||||||
if [ $# -ge 1 ]; then
|
if [ $# -ge 1 ]; then
|
||||||
list="$*"
|
list="$*"
|
||||||
else
|
else
|
||||||
list="arcamax comicfury comicgenesis comicskingdom creators gocomics keenspot tapastic webcomicfactory webtoons"
|
list="arcamax comicfury comicgenesis comicskingdom creators gocomics keenspot tapastic webcomicfactory"
|
||||||
fi
|
fi
|
||||||
for script in $list; do
|
for script in $list; do
|
||||||
target="${d}/../dosagelib/plugins/${script}.py"
|
target="${d}/../dosagelib/plugins/${script}.py"
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
# SPDX-License-Identifier: MIT
|
|
||||||
# Copyright (C) 2019-2020 Tobias Gruetzmacher
|
|
||||||
# Copyright (C) 2019-2020 Daniel Ring
|
|
||||||
"""
|
|
||||||
Script to get a list of WebToons comics and save the info in a
|
|
||||||
JSON file for further processing.
|
|
||||||
"""
|
|
||||||
from urllib.parse import urlsplit, parse_qs
|
|
||||||
|
|
||||||
from scriptutil import ComicListUpdater
|
|
||||||
from dosagelib.util import check_robotstxt
|
|
||||||
|
|
||||||
|
|
||||||
class WebToonsUpdater(ComicListUpdater):
|
|
||||||
def collect_results(self):
|
|
||||||
# Parse the comic list page
|
|
||||||
data = self.get_url('https://www.webtoons.com/en/dailySchedule')
|
|
||||||
|
|
||||||
for comiclink in data.xpath('//a[contains(@class, "daily_card_item")]'):
|
|
||||||
comicurl = comiclink.attrib['href']
|
|
||||||
name = comiclink.xpath('.//div[@class="info"]/p[@class="subj"]')[0].text
|
|
||||||
try:
|
|
||||||
check_robotstxt(comicurl, self.session)
|
|
||||||
except IOError as e:
|
|
||||||
print('[%s] INFO: robots.txt denied: %s' % (name, e))
|
|
||||||
continue
|
|
||||||
|
|
||||||
self.add_comic(name, comicurl)
|
|
||||||
|
|
||||||
def get_entry(self, name, url):
|
|
||||||
shortName = name.replace(' ', '')
|
|
||||||
titleNum = int(parse_qs(urlsplit(url).query)['title_no'][0])
|
|
||||||
url = url.rsplit('/', 1)[0].replace('https://www.webtoons.com/en/', '')
|
|
||||||
return u"cls('%s', '%s', %d)," % (shortName, url, titleNum)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
WebToonsUpdater(__file__).run()
|
|
Loading…
Reference in a new issue