[generic] prefer enclosures over following links
This commit is contained in:
parent
68ddba20ae
commit
57182dca50
@ -2009,13 +2009,14 @@ class GenericIE(InfoExtractor):
|
||||
|
||||
entries = []
|
||||
for it in doc.findall('./channel/item'):
|
||||
next_url = xpath_text(it, 'link', fatal=False)
|
||||
if not next_url:
|
||||
enclosure_nodes = it.findall('./enclosure')
|
||||
for e in enclosure_nodes:
|
||||
next_url = e.attrib.get('url')
|
||||
if next_url:
|
||||
break
|
||||
enclosure_nodes = it.findall('./enclosure')
|
||||
for e in enclosure_nodes:
|
||||
next_url = e.attrib.get('url')
|
||||
if next_url:
|
||||
break
|
||||
|
||||
if not enclosure_nodes:
|
||||
next_url = xpath_text(it, 'link', fatal=False)
|
||||
|
||||
if not next_url:
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user