http://blog.csdn.net/heng615975867/article/details/50437414
https://github.com/rg3/youtube-dl
original video webpage
http://v.qq.com/x/cover/g9jgclyhpp5sp7p.html?vid=g00118pmaso&ptag=blog_csdn_net
inspect and view the network
find the real url to open video
remove some parameters and make sure the url is still functionable
Response Header
POST /getvkey HTTP/1.1
Host: vv.video.qq.com
Connection: keep-alive
Content-Length: 696
Pragma: no-cache
Cache-Control: no-cache
Origin: http://imgcache.qq.com
X-Requested-With: ShockwaveFlash/22.0.0.209
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: /
Referer: http://imgcache.qq.com/tencentvideo_v1/playerv3/TencentPlayer.swf?max_age=86400&v=20160929
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Cookie: ptui_loginuin=497149367; ptcz=74649f679f041cfdd2f915245fcd6862f1f48330f4d1c9af87de668817ac4f06; pt2gguin=o0497149367; tvfe_boss_uuid=d2fcf80b90c68b2b; o_cookie=497149367; pgv_info=ssid=s8808674630; pgv_pvid=2207831543
Response
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<root><s>o</s><keyid>g00118pmaso.10303.1</keyid><filename>g00118pmaso.p303.mp4</filename><key>D2B92D540528722D0D47339B7CF9BBF12B1589B7C05CAB349E60D8A64B8B1099936EA114F654DA5E8ECBAD9AA56064801E30C76246A0B46AB0A3AA370E3F70E666326731873753C436C2E248B7EE34421BB28FA2BBDF8E1E24647DECABB45BC95FFF0CA057019122670097E3137E652D</key>
43701.918</br><sp>0</sp><ct>21600</ct><sr>0</sr><level>0</level><levelvalid>1</levelvalid></root>