Update javdb.py

This commit is contained in:
mo_yy 2020-01-10 18:25:35 +08:00 committed by GitHub
parent 9c71e5976a
commit 3545705283
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,7 @@ def getOutline(htmlcode):
def main(number): def main(number):
number = number.upper()
try: try:
a = get_html('https://javdb.com/search?q=' + number + '&f=all').replace(u'\xa0', u' ') a = get_html('https://javdb.com/search?q=' + number + '&f=all').replace(u'\xa0', u' ')
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text() html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
@ -140,6 +141,7 @@ def main(number):
a = get_html('https://javdb.com/search?q=' + number + '&f=all').replace(u'\xa0', u' ') a = get_html('https://javdb.com/search?q=' + number + '&f=all').replace(u'\xa0', u' ')
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text() html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
result1 = html.xpath('//*[@id="videos"]/div/div/a/@href')[0] result1 = html.xpath('//*[@id="videos"]/div/div/a/@href')[0]
print(html.xpath('//*[@id="videos"]/div/div/a/@href'))
b = get_html('https://javdb.com' + result1).replace(u'\xa0', u' ') b = get_html('https://javdb.com' + result1).replace(u'\xa0', u' ')
dic = { dic = {
'actor': getActor(b), 'actor': getActor(b),