domains.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:script.reddit.reader 作者: gedisony 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号