Merge remote-tracking branch 'origin/master'
# Conflicts: # scrapinglib/fanza.py
This commit is contained in:
@@ -139,8 +139,9 @@ class Fanza(Parser):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def getExtrafanart(self, htmltree):
|
def getExtrafanart(self, htmltree):
|
||||||
htmltext = re.search(r'<div id=\"sample-image-block\"[\s\S]*?<br></div>\s*?</div>', self.htmlcode).group()
|
htmltext = re.search(r'<div id=\"sample-image-block\"[\s\S]*?<br></div>\s*?</div>', self.htmlcode)
|
||||||
if htmltext:
|
if htmltext:
|
||||||
|
htmltext = htmltext.group()
|
||||||
extrafanart_images = re.findall(r'<img.*?src=\"(.*?)\"', htmltext)
|
extrafanart_images = re.findall(r'<img.*?src=\"(.*?)\"', htmltext)
|
||||||
if extrafanart_images:
|
if extrafanart_images:
|
||||||
sheet = []
|
sheet = []
|
||||||
@@ -151,10 +152,12 @@ class Fanza(Parser):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def getTrailer(self, htmltree):
|
def getTrailer(self, htmltree):
|
||||||
htmltext = re.search(r'<script type=\"application/ld\+json\">[\s\S].*}\s*?</script>', self.htmlcode).group()
|
htmltext = re.search(r'<script type=\"application/ld\+json\">[\s\S].*}\s*?</script>', self.htmlcode)
|
||||||
if htmltext:
|
if htmltext:
|
||||||
url = re.search(r'\"contentUrl\":\"(.*?)\"', htmltext).group(1)
|
htmltext = htmltext.group()
|
||||||
|
url = re.search(r'\"contentUrl\":\"(.*?)\"', htmltext)
|
||||||
if url:
|
if url:
|
||||||
|
url = url.group(1)
|
||||||
url = url.rsplit('_', 2)[0] + '_mhb_w.mp4'
|
url = url.rsplit('_', 2)[0] + '_mhb_w.mp4'
|
||||||
return url
|
return url
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
Reference in New Issue
Block a user