youtube-dl/youtube_dl/extractor
Marcin Cieślak a8eeb0597b Fix AssertionError when og property not found
On tvp.pl some webpages contain OpenGraph
metadata and some don't.

If og property is not found, _og_search_description
fails with

WARNING: unable to extract OpenGraph description; please report this issue on http://yt-dl.org/bug
Traceback (most recent call last):
  File "/usr/home/saper/bin/youtube-dl", line 18, in <module>
    youtube_dl.main()
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/__init__.py", line 766, in main
    _real_main(argv)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/__init__.py", line 719, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/YoutubeDL.py", line 715, in download
    videos = self.extract_info(url)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/YoutubeDL.py", line 348, in extract_info
    ie_result = ie.extract(url)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/extractor/common.py", line 125, in extract
    return self._real_extract(url)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/extractor/tvp.py", line 56, in _real_extract
    info['description'] = self._og_search_description(webpage)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/extractor/common.py", line 331, in _og_search_description
    return self._og_search_property('description', html, fatal=False, **kargs)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/extractor/common.py", line 325, in _og_search_property
    return unescapeHTML(escaped)
  File "/usr/home/saper/sw/youtube-dl/youtube_dl/utils.py", line 494, in unescapeHTML
    assert type(s) == type(u'')
AssertionError

The patch allows me to use:

  try:
    info['description'] = self._og_search_description(webpage)
    info['thumbnail'] = self._og_search_thumbnail(webpage)
  except RegexNotFoundError:
    pass
2013-11-05 23:19:29 +01:00
..
__init__.py Merge remote-tracking branch 'CBGoodBuddy/ytsearchtime' 2013-11-03 15:56:55 +01:00
addanime.py Let extractors omit ext in formats 2013-10-28 11:28:02 +01:00
appletrailers.py
archiveorg.py Set the ext field for each format 2013-09-14 14:45:04 +02:00
ard.py
arte.py [arte] Download the 'Originalversion' version if it's the only one available (fixes #1682) 2013-10-29 20:58:49 +01:00
auengine.py
bambuser.py [bambuser] Add an extractor for channels (closes #1702) 2013-11-02 19:50:57 +01:00
bandcamp.py
bliptv.py
bloomberg.py
breakcom.py
brightcove.py [brightcove] Don't set the extension 2013-11-02 21:20:46 +01:00
c56.py
canalc2.py [canal2c] Accept more urls (fixes #1723) 2013-11-04 22:26:19 +01:00
canalplus.py
cinemassacre.py [CinemassacreIE] Support more embed urls 2013-11-01 01:24:23 +01:00
cnn.py
collegehumor.py
comedycentral.py
common.py Fix AssertionError when og property not found 2013-11-05 23:19:29 +01:00
condenast.py Add CondeNastIE 2013-07-17 14:39:02 +02:00
criterion.py
cspan.py
dailymotion.py [dailymotion] Fix support for age-restricted videos (Fixes #1688) 2013-10-31 00:20:49 +01:00
daum.py
defense.py
depositfiles.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
dotsub.py
dreisat.py
ebaumsworld.py
ehow.py
eighttracks.py
escapist.py
exfm.py [exfm] skip tests 2013-11-02 20:51:09 +01:00
extremetube.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
facebook.py
faz.py
fktv.py
flickr.py
francetv.py
freesound.py
funnyordie.py
gamespot.py
gametrailers.py
generic.py [GenericIE] Also detect youtube if src url of iframe is embedded in ' instaed of " 2013-11-05 02:08:02 +01:00
googleplus.py
googlesearch.py
hark.py
hotnewhiphop.py
howcast.py
hypem.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
ign.py
ina.py
infoq.py
instagram.py
internetvideoarchive.py
jeuxvideo.py
jukebox.py
justintv.py
kankan.py
keek.py
keezmovies.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
kickstarter.py
liveleak.py InfoExtractor: add some helper methods to extract OpenGraph info 2013-07-12 22:12:04 +02:00
livestream.py [livestream] fix the extraction of events 2013-10-31 08:07:26 +01:00
metacafe.py [metacafe] Fix support for age-restricted videos (fixes #1696) 2013-11-01 11:56:15 +01:00
metacritic.py
mit.py
mixcloud.py
mofosex.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
mtv.py [mtv] Remove the templates from the mediagen url 2013-10-28 23:37:01 +01:00
muzu.py
myspace.py Add an extractor for MySpace (closes #1666) 2013-10-28 22:02:17 +01:00
myspass.py
myvideo.py
naver.py
nba.py
nbc.py
newgrounds.py
nhl.py
nowvideo.py
ooyala.py
orf.py
pbs.py
photobucket.py
pornhub.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
pornotube.py
rbmaradio.py
redtube.py
ringtv.py
ro220.py
rottentomatoes.py
roxwel.py
rtlnow.py
rutube.py
sina.py
slashdot.py
slideshare.py
sohu.py
soundcloud.py
southparkstudios.py
spankwire.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
spiegel.py
stanfordoc.py
statigram.py
steam.py
subtitles.py
sztvhu.py
teamcoco.py [teamcoco] Parse the xml file and extract all the formats 2013-11-03 17:48:12 +01:00
techtalks.py
ted.py
tf1.py Disable way and tf1 tests, the whole videos are served sometimes, so the md5 sum doesn't match. 2013-07-30 11:19:07 +02:00
thisav.py
traileraddict.py
trilulilu.py
tube8.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
tudou.py
tumblr.py
tutv.py
unistra.py
ustream.py
vbox7.py
veehd.py
veoh.py VeohIE: remove debug logging 2013-07-09 11:11:55 +02:00
vevo.py [vevo] Readd support for SMIL (Fixes #1683) 2013-10-30 01:14:17 +01:00
vice.py
viddler.py [viddler] Support non-digit IDs (Fixes #1714) 2013-11-03 15:49:59 +01:00
videodetective.py
videofyme.py
videopremium.py
vimeo.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
vine.py
vk.py Add an extractor for vk.com (closes #1635) 2013-11-01 22:34:18 +01:00
wat.py
websurg.py
weibo.py
wimp.py
worldstarhiphop.py
xhamster.py
xnxx.py
xtube.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
xvideos.py
yahoo.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
youjizz.py
youku.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
youporn.py Style fixes for extractors: remove spaces around (,),{ and } 2013-11-03 14:06:47 +01:00
youtube.py [youtube] Add description for YoutubeSearchDateIE (#1710) 2013-11-03 15:59:10 +01:00
zdf.py [zdf] Add support for hash URLs and simplify (#1518) 2013-09-28 15:43:34 +02:00