fix #206
This commit is contained in:
13
fanza.py
13
fanza.py
@@ -96,6 +96,18 @@ def getRelease(text):
|
|||||||
result = html.xpath(
|
result = html.xpath(
|
||||||
"//td[contains(text(),'発売日:')]/following-sibling::td/text()"
|
"//td[contains(text(),'発売日:')]/following-sibling::td/text()"
|
||||||
)[0].lstrip("\n")
|
)[0].lstrip("\n")
|
||||||
|
if result == "----":
|
||||||
|
try:
|
||||||
|
result = html.xpath(
|
||||||
|
"//td[contains(text(),'配信開始日:')]/following-sibling::td/a/text()"
|
||||||
|
)[0].lstrip("\n")
|
||||||
|
except:
|
||||||
|
try:
|
||||||
|
result = html.xpath(
|
||||||
|
"//td[contains(text(),'配信開始日:')]/following-sibling::td/text()"
|
||||||
|
)[0].lstrip("\n")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
@@ -223,6 +235,7 @@ def main(number):
|
|||||||
) # .encode('UTF-8')
|
) # .encode('UTF-8')
|
||||||
return js
|
return js
|
||||||
|
|
||||||
|
|
||||||
def main_htmlcode(number):
|
def main_htmlcode(number):
|
||||||
# fanza allow letter + number + underscore, normalize the input here
|
# fanza allow letter + number + underscore, normalize the input here
|
||||||
# @note: I only find the usage of underscore as h_test123456789
|
# @note: I only find the usage of underscore as h_test123456789
|
||||||
|
|||||||
Reference in New Issue
Block a user