mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[faz] Use a regex for getting the description
The page cannot be parsed in python2.6 with the html parser.
This commit is contained in:
parent
749a4fd2fd
commit
af4d506eb3
1 changed files with 2 additions and 4 deletions
|
@ -5,8 +5,6 @@
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
determine_ext,
|
determine_ext,
|
||||||
clean_html,
|
|
||||||
get_element_by_attribute,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,12 +45,12 @@ def _real_extract(self, url):
|
||||||
'format_id': code.lower(),
|
'format_id': code.lower(),
|
||||||
})
|
})
|
||||||
|
|
||||||
descr_html = get_element_by_attribute('class', 'Content Copy', webpage)
|
descr = self._html_search_regex(r'<p class="Content Copy">(.*?)</p>', webpage, u'description')
|
||||||
info = {
|
info = {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': self._og_search_title(webpage),
|
'title': self._og_search_title(webpage),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'description': clean_html(descr_html),
|
'description': descr,
|
||||||
'thumbnail': config.find('STILL/STILL_BIG').text,
|
'thumbnail': config.find('STILL/STILL_BIG').text,
|
||||||
}
|
}
|
||||||
# TODO: Remove when #980 has been merged
|
# TODO: Remove when #980 has been merged
|
||||||
|
|
Loading…
Reference in a new issue