Fix VerloreGeleentheid
This commit is contained in:
parent
15ac062dff
commit
4219b32074
1 changed files with 19 additions and 0 deletions
|
@ -25,6 +25,8 @@ class SmackJeeves(_ParserScraper):
|
||||||
self.adult = adult
|
self.adult = adult
|
||||||
self.endOfLife = endOfLife or last
|
self.endOfLife = endOfLife or last
|
||||||
self.lastid = (last or 0) - 1
|
self.lastid = (last or 0) - 1
|
||||||
|
if name == 'VerloreGeleentheid':
|
||||||
|
self.textSearch = True
|
||||||
|
|
||||||
def starter(self):
|
def starter(self):
|
||||||
response = self.session.post(self.apiBase + 'articleList',
|
response = self.session.post(self.apiBase + 'articleList',
|
||||||
|
@ -53,6 +55,23 @@ class SmackJeeves(_ParserScraper):
|
||||||
articleNo = int(page_url.rsplit('=', 1)[1])
|
articleNo = int(page_url.rsplit('=', 1)[1])
|
||||||
return '{:04}'.format(articleNo)
|
return '{:04}'.format(articleNo)
|
||||||
|
|
||||||
|
def fetchText(self, url, data, textSearch, optional):
|
||||||
|
if 'VerloreGeleentheid' in self.name:
|
||||||
|
response = self.session.post('https://www.smackjeeves.com/api/comments/get', params={
|
||||||
|
'titleNo': self._comicid,
|
||||||
|
'articleNo': url.rsplit('=', 1)[1],
|
||||||
|
'page': 1,
|
||||||
|
'order': 'new'
|
||||||
|
})
|
||||||
|
response.raise_for_status()
|
||||||
|
comments = response.json()['result']['list']
|
||||||
|
for comment in reversed(comments):
|
||||||
|
if comment['nickname'] == 'Wolfie_Inu':
|
||||||
|
return comment['commentText']
|
||||||
|
return None
|
||||||
|
else:
|
||||||
|
super(SmackJeeves, self).fetchText(url, data, textSearch, optional)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getmodules(cls):
|
def getmodules(cls):
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue