From 65f0536ff134814b44054fa5c82000c62aec7b81 Mon Sep 17 00:00:00 2001 From: jnozsc Date: Sat, 11 Apr 2020 15:59:49 -0700 Subject: [PATCH] fix #206 --- fanza.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fanza.py b/fanza.py index ab2bb33..607260c 100644 --- a/fanza.py +++ b/fanza.py @@ -96,6 +96,18 @@ def getRelease(text): result = html.xpath( "//td[contains(text(),'発売日:')]/following-sibling::td/text()" )[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 @@ -223,6 +235,7 @@ def main(number): ) # .encode('UTF-8') return js + def main_htmlcode(number): # fanza allow letter + number + underscore, normalize the input here # @note: I only find the usage of underscore as h_test123456789