check uri not start with /

This commit is contained in:
lededev
2021-06-06 04:57:24 +08:00
parent 5abeb360af
commit e2cd1f09df

View File

@@ -49,7 +49,10 @@ def getCover(htmlcode): #获取封面链接
image = doc('a.bigImage')
uri = image.attr('href')
if uri[0:4] != 'http':
return "https://www.javbus.com" + uri
if uri[0] == '/':
return "https://www.javbus.com" + uri
else:
return "https://www.javbus.com/" + uri
return uri
def getRelease(htmlcode): #获取出版日期
html = etree.fromstring(htmlcode, etree.HTMLParser())