mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-07-02 00:19:29 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
405d879db6 | |||
41342a6da0 |
@ -1,3 +1,3 @@
|
|||||||
__version__ = '0.5.15'
|
__version__ = '0.5.16'
|
||||||
__author__ = 'RicterZ'
|
__author__ = 'RicterZ'
|
||||||
__email__ = 'ricterzheng@gmail.com'
|
__email__ = 'ricterzheng@gmail.com'
|
||||||
|
@ -142,14 +142,17 @@ def doujinshi_parser(id_, counter=0):
|
|||||||
title = doujinshi_info.find('h1').text
|
title = doujinshi_info.find('h1').text
|
||||||
pretty_name = doujinshi_info.find('h1').find('span', attrs={'class': 'pretty'}).text
|
pretty_name = doujinshi_info.find('h1').find('span', attrs={'class': 'pretty'}).text
|
||||||
subtitle = doujinshi_info.find('h2')
|
subtitle = doujinshi_info.find('h2')
|
||||||
favorite_counts = doujinshi_info.find('span', class_='nobold').find('span', class_='count')
|
favorite_counts = doujinshi_info.find('span', class_='nobold').find('span', class_='count')\
|
||||||
if favorite_counts is None:
|
|
||||||
favorite_counts = '0'
|
if favorite_counts:
|
||||||
|
favorite_counts = favorite_counts.text.strip()
|
||||||
|
else:
|
||||||
|
favorite_counts = 0
|
||||||
|
|
||||||
doujinshi['name'] = title
|
doujinshi['name'] = title
|
||||||
doujinshi['pretty_name'] = pretty_name
|
doujinshi['pretty_name'] = pretty_name
|
||||||
doujinshi['subtitle'] = subtitle.text if subtitle else ''
|
doujinshi['subtitle'] = subtitle.text if subtitle else ''
|
||||||
doujinshi['favorite_counts'] = favorite_counts.strip()
|
doujinshi['favorite_counts'] = favorite_counts
|
||||||
|
|
||||||
doujinshi_cover = html.find('div', attrs={'id': 'cover'})
|
doujinshi_cover = html.find('div', attrs={'id': 'cover'})
|
||||||
img_id = re.search('/galleries/([0-9]+)/cover.(jpg|png|gif|webp)$',
|
img_id = re.search('/galleries/([0-9]+)/cover.(jpg|png|gif|webp)$',
|
||||||
|
Reference in New Issue
Block a user