修正javdb有时拿不到cover的问题

class="column is-three-fifths column-video-cover"
This commit is contained in:
mtxcab
2020-03-24 21:39:04 -07:00
committed by GitHub
parent 8d1b1eb84d
commit 8848d10d00

View File

@@ -70,7 +70,7 @@ def getCover_small(a, index=0):
return result
def getCover(htmlcode):
html = etree.fromstring(htmlcode, etree.HTMLParser())
result = str(html.xpath("//div[@class='column column-video-cover']/a/img/@src")).strip(" ['']")
result = str(html.xpath("//div[contains(@class, 'column-video-cover')]/a/img/@src")).strip(" ['']")
return result
def getDirector(a):
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()