WebCrawler:全面换装getInstance(),厘清airav.py与javbus.py及javdb.py的相爱相杀

This commit is contained in:
lededev
2021-10-08 11:46:35 +08:00
parent cf072e79d1
commit a405c5c41b
11 changed files with 206 additions and 167 deletions

View File

@@ -93,10 +93,11 @@ def main(number):
actor = '素人'
lx = etree.fromstring(htmlcode2, etree.HTMLParser())
cover = str(lx.xpath("//div[@class='items_article_MainitemThumb']/span/img/@src")).strip(" ['']")
cover = ADC_function.urljoin('https://adult.contents.fc2.com', cover)
dic = {
'title': lx.xpath('/html/head/title/text()')[0],
'studio': getStudio_fc2com(htmlcode2),
'year': getYear_fc2com(getRelease_fc2com(htmlcode2)),
'year': getYear_fc2com(getRelease_fc2com(htmlcode2)),
'outline': '', # getOutline_fc2com(htmlcode2),
'runtime': str(lx.xpath("//p[@class='items_article_info']/text()")[0]),
'director': getStudio_fc2com(htmlcode2),
@@ -116,7 +117,7 @@ def main(number):
'series': '',
}
except Exception as e:
if ADC_function.config.Config().debug():
if ADC_function.config.getInstance().debug():
print(e)
dic = {"title": ""}
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
@@ -124,4 +125,5 @@ def main(number):
if __name__ == '__main__':
print(main('FC2-1787685'))
print(main('FC2-2086710'))