爬虫背景
原计划继续写一下关于手机APP的爬虫,结果发现夜神模拟器总是卡死,比较懒,不想找原因了,哈哈,所以接着写后面的博客了,从50篇开始要写几篇python爬虫的骚操作,也就是用Python3通过爬虫实现一些小工具。
Python3 VIP视频下载器
这种软件或者网站满天都是了,就是在线观看收费网站的VIP视频,你只要会玩搜索引擎或者是一个程序员基本都知道,虽说一直在被封杀,但是能赚钱的地方就一定有人钻漏洞。今天要实现的就是通过别人的API在Python中下载ts视频到本地,自己去百度一下TS视频是什么吧。
找相关的接口
我随便搜索了一下,那是非常多的,版权问题,就不放相关的地址了,当然在代码中还是会出现一下的。
我找到这个接口应该是目前相对比较稳定的,并且还在更新的
我看了一下,他中间主要通过三个API整体实现的页面逻辑
首先你先去优酷啊,腾讯啊,爱奇艺啊找个VIP视频的地址,这个随意啦
我找了一个《叶问外传》
http://v.youku.com/v_show/id_XNDA0MDg2NzU0OA==.html?spm=a2h03.8164468.2069780.5
编写代码几个步骤
在浏览器测试播放地址,得到线路播放数据
http://y.mt2t.com/lines?url=https://v.qq.com/x/cover/5a3aweewodeclku/b0024j13g3b.