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
appletrailers.py
archiveorg.py
ard.py
arte.py
auengine.py
bambuser.py
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
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
criterion.py
cspan.py
dailymotion.py
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
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
livestream.py
metacafe.py
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
muzu.py
myspace.py
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 Add an extractor for roxwell.com (closes #1044) 2013-07-26 13:00:59 +02:00
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
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
vevo.py
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
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