2010-12-13, 19:22
2010-12-13, 21:07
Thanks for your bug report. I have the same issue. I think this is a website problem, i will try to fix this later.
2011-01-23, 13:19
For support of Harald Schmidt-Show (not available through ARD-Mediathek)
and for 'Mit offenen Karten'
here's the full file
http://pastie.org/1610093
Code:
def get_video_hs():
url = 'http://www.daserste.de/haraldschmidt/letztesendung.asp'
pattern = 'hd.*%5F(\d*)%2F(\d*)%2Fformat(\d*)%2Ef4v'
# parse the website
s = urllib2.urlopen(url).read()
video = re.compile(pattern).findall(s)[0]
video = 'rtmp://vod.daserste.de/ardfs/ playpath=mp4:videoportal/mediathek/Harald+Schmidt/c_'+video[0]+'/'+video[1]+'/format'+video[2]+'.f4v'
# fetch the date from the video url
date_pattern = r'<title>DasErste.de - Video der Sendung vom (\S*)</title>'
date = re.compile(date_pattern).findall(s)[0]
# return video+date
return date, video
#
date, url = get_video_hs()
addLink('Harald Schmidt ('+date+')', url, 'http://download.daserste.de/videoportal/Bild/c_160000/166153/format182063.jpg')
and for 'Mit offenen Karten'
Code:
def get_video_mok():
# parse the website
url = 'http://www.arte.tv/de/Die-Welt-verstehen/194,templateId=rightColumn,dossier=392,CmPart=com.arte-tv.www.html'
pattern = 'http://videos.arte.tv/de/videos/mit_offenen_karten-(\d*).html'
s = urllib2.urlopen(url).read()
video = re.compile(pattern).findall(s)[0]
# parse the website
url = 'http://videos.arte.tv/de/do_delegate/videos/mit_offenen_karten-'+video+',view,asPlayerXml.xml'
pattern = 'http://videos.arte.tv/de/do_delegate/videos/mit_offenen_karten-(\d*),view,asPlayerXml.xml'
s = urllib2.urlopen(url).read()
video = re.compile(pattern).findall(s)[0]
# parse the website
url = 'http://videos.arte.tv/de/do_delegate/videos/mit_offenen_karten-'+video+',view,asPlayerXml.xml'
pattern = '<url quality="hd">(\S*)</url>'
s = urllib2.urlopen(url).read()
video = re.compile(pattern).findall(s)[0]
# fetch the date from the video url
#<dateVideo>Sat, 12 Feb 2011 19:17:14 +0100</dateVideo>
date_pattern = '<dateVideo>\S*, (.*) \d\d:\d\d:\d\d \S*</dateVideo>'
date = re.compile(date_pattern).findall(s)[0]
# fetch the thumbnail from the video url
#<dateVideo>Sat, 12 Feb 2011 19:17:14 +0100</dateVideo>
thumb_pattern = '<firstThumbnailUrl>(\S*)</firstThumbnailUrl>'
thumb = re.compile(thumb_pattern).findall(s)[0]
# return video+date+thumb
return date, video, thumb
###
date, url, thumb = get_video_mok()
addLink('Mit offenen Karten ('+date+')', url, thumb)
here's the full file
http://pastie.org/1610093