aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-10-27 14:18:55 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-10-27 14:18:55 +0100
commitaf4d506eb35a257e91098fa92498b24ef5de14c6 (patch)
treefe4e67797c2b77d3fc0c49358666684e09fb3f20
parent749a4fd2fd88017bafca5c298f16123fd0146b40 (diff)
downloadyoutube-dl-af4d506eb35a257e91098fa92498b24ef5de14c6.tar.xz
[faz] Use a regex for getting the description
The page cannot be parsed in python2.6 with the html parser.
-rw-r--r--youtube_dl/extractor/faz.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/youtube_dl/extractor/faz.py b/youtube_dl/extractor/faz.py
index deaa4ed2d..89ed08db4 100644
--- a/youtube_dl/extractor/faz.py
+++ b/youtube_dl/extractor/faz.py
@@ -5,8 +5,6 @@ import xml.etree.ElementTree
from .common import InfoExtractor
from ..utils import (
determine_ext,
- clean_html,
- get_element_by_attribute,
)
@@ -47,12 +45,12 @@ class FazIE(InfoExtractor):
'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 = {
'id': video_id,
'title': self._og_search_title(webpage),
'formats': formats,
- 'description': clean_html(descr_html),
+ 'description': descr,
'thumbnail': config.find('STILL/STILL_BIG').text,
}
# TODO: Remove when #980 has been merged