def get_playable_url(self, link_url, is_probably_a_video=False ):
self.media_url=link_url
#u=media_url.split('?')[0]
html=self.requests_get(link_url)
#if '11616' in link_url:log(html.text)
images=self.get_images(html.text,self.p)
if images:
#if '11616' in link_url:log(pprint.pformat(images))
self.media_type=self.TYPE_ALBUM
return self.media_url, self.media_type
else:
#default to youtube-dl video.
#direct image link posts are already taken care of in get_playable()
#the only video sample i found is not playable via ytdl. TODO: .mp4 is in javascript block
# http://acidcow.com/video/61149-russian_soldiers_got_the_steel_balls.html
self.link_action=self.DI_ACTION_YTDL
return self.media_url, self.TYPE_VIDEO
评论列表
文章目录