python和tkinter制作得抖音下载器
输入抖音分享链接,个人名片-链接形式 ,
现在用抖音红人 面筋哥做测试:http://v.douyin.com/d5xrhV/点击GO
每个视频都截图了1张
完整代码见GITHUB
部分代码如下:
解析UID
import requests import os,re from lxml import etree def get_uid(url): res = requests.get(url).text html = etree.HTML(res) pa_url_uid = '//span[@class="focus-btn go-author"]/@data-id' try: uid=html.xpath(pa_url_uid)[0] if uid: print('uid为:',uid) return uid except Exception: print('未解析出uid') return False if __name__ == '__main__': # url = 'http://v.douyin.com/dBEA1k/' url='http://v.douyin.com/d51pGJ/' get_uid(url)