大家好,又见面了,我是你们的朋友全栈君。
首先来看微信视频号信息的XML内容:
<?xml version="1.0"?>
<msg>
<appmsg appid="" sdkver="0">
<title>当前微信版本不支持展示该内容,请升级至最新版本。</title>
<des />
<action />
<type>51</type>
<showtype>0</showtype>
<soundtype>0</soundtype>
<mediatagname />
<messageext />
<messageaction />
<content />
<contentattr>0</contentattr>
<url>https://support.weixin.qq.com/security/readtemplate?t=w_security_center_website/upgrade</url>
<lowurl />
<dataurl />
<lowdataurl />
<songalbumurl />
<songlyric />
<appattach>
<totallen>0</totallen>
<attachid />
<emoticonmd5></emoticonmd5>
<fileext />
<cdnthumbaeskey />
<aeskey></aeskey>
</appattach>
<extinfo />
<sourceusername />
<sourcedisplayname />
<thumburl />
<md5 />
<statextstr />
<directshare>0</directshare>
<recorditem><![CDATA[(null)]]></recorditem>
<finderFeed>
<objectId><![CDATA[13792200214367967426]]></objectId>
<feedType><![CDATA[4]]></feedType>
<nickname><![CDATA[老陈产品结构设计]]></nickname>
<avatar><![CDATA[http://wx.qlogo.cn/finderhead/SYeWkon6C6Jtd1gz9wKSdwzOt9ZXNZj4mGhGgtX2JSqt73XwTI5AWg/0]]></avatar>
<desc><![CDATA[#国足#中国女足#中国足球 女足精神,我们永远的信任]]></desc>
<mediaCount><![CDATA[1]]></mediaCount>
<objectNonceId><![CDATA[12052175326133612216_4_20_13_1]]></objectNonceId>
<liveId><![CDATA[0]]></liveId>
<username><![CDATA[v2_060000231003b20faec8c6eb8c1ac0ddcf04e831b0777466de04893ff61cedf7ec51ff9a1d54@finder]]></username>
<authIconUrl><![CDATA[]]></authIconUrl>
<authIconType>0</authIconType>
<mediaList>
<media>
<thumbUrl><![CDATA[http://wxapp.tc.qq.com/251/20350/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLIBn9G5YG8ZnJZs7Yk2zHcx9JMwdp7vEK42hyzt3ibE7qtWkVvjFkoaEznjhDjFLr6HoGbvDE9YhM4OugAYsIy2ouYB9xUiaX8UmMWDNGxPTYMcwHdcA5og5I&adaptivelytrans=0&bizid=1023&dotrans=0&hy=SZ&idx=1&m=7928fb21dd4990e2d616a507c868b1db&token=x5Y29zUxcibDjE9JYkmdS0hpQGM3d8WFCuH6NzPCF7B8wJZOkRG8xGNUq9eyOhI4S]]></thumbUrl>
<fullCoverUrl><![CDATA[http://wxapp.tc.qq.com/251/20304/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLIBn9G5YG8ZnDPFFhBkNhDicVGWRL3ac1xH1QJuHj4J2p4o0SIibPlicfDMtZ0xQ57V0aOuicCDF1FWb1jjV055BjqhJar9I9XsRAtZby7ZAIWmhGYKHpmUKh6o&adaptivelytrans=0&bizid=1023&dotrans=0&hy=SZ&idx=1&m=9c67d942aa03563cebc4c4c6ee6bd409&token=cztXnd9GyrG0x7aBXH688fOjlVrfibibh2ZZQVFCciaEEOZPFWqr6IcvYBBCic2y9LjE]]></fullCoverUrl>
<videoPlayDuration><![CDATA[10]]></videoPlayDuration>
<url><![CDATA[http://wxapp.tc.qq.com/251/20302/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLIBn9G5YG8Zn3jmCXSIuM4TgiclBMxmiaJPEoUPf6JomNt9oRbUfqQ8o7zeCL922z0BJsjImAraGOsWg7xicQicIUqDiaocz6iaN4zF5yjzxyNHlmk0M1GQKtflAA&a=1&adaptivelytrans=0&bizid=1023&dotrans=2991&hy=SZ&idx=1&m=fe61ea9b87bdb3f1aae648d781fba17a]]></url>
<coverUrl><![CDATA[]]></coverUrl>
<height><![CDATA[1920]]></height>
<mediaType><![CDATA[4]]></mediaType>
<fullClipInset><![CDATA[]]></fullClipInset>
<width><![CDATA[888]]></width>
</media>
</mediaList>
<megaVideo>
<objectId><![CDATA[]]></objectId>
<objectNonceId><![CDATA[]]></objectNonceId>
</megaVideo>
<bizUsername><![CDATA[]]></bizUsername>
<bizNickname><![CDATA[]]></bizNickname>
<bizAvatar><![CDATA[]]></bizAvatar>
<bizUsernameV2><![CDATA[]]></bizUsernameV2>
<bizAuthIconUrl><![CDATA[]]></bizAuthIconUrl>
<bizAuthIconType>0</bizAuthIconType>
</finderFeed>
</appmsg>
<fromusername>keepmoving8</fromusername>
<scene>0</scene>
<appinfo>
<version>1</version>
<appname />
</appinfo>
<commenturl />
</msg>
有了这个信息,就可以通过<objectId><![CDATA[13792200214367967426]]></objectId>和<objectNonceId><![CDATA[12052175326133612216_4_20_13_1]]></objectNonceId>中的值获取到视频的源地址了。
通过POST数据到微信接口上:
{
"api":1030,
"param1":"13792200214367967426",
"param2":"12052175326133612216_4_20_13_1"
}
就可以获取返回的JSON值了:
{
"api":1030,
"port":20023,
"pid":100876,
"wechat":"wxid_yz9trmrddpek12",
"objectId":"13792200214367967426",
"objectNonceId":"12052175326133612216_4_20_13_1",
"msg":"获取视频号链接",
"url":"https://finder.video.qq.com/251/20302/stodownload?encfilekey=oibeqyX228riaCwo9STVsGLIBn9G5YG8Zn3jmCXSIuM4TgiclBMxmiaJPEoUPf6JomNt9oRbUfqQ8o7zeCL922z0BJsjImAraGOsWg7xicQicIUqDiaocz6iaN4zF5yjzxyNHlmk0M1GQKtflAA&token=AxricY7RBHdV7TzVPJKnibLl5ibXjdMu1W1ccZItSrshygk8yeCXL3zRNn9v9FPaGeddDiaqicqFwibicE&idx=1&a=1&adaptivelytrans=0&bizid=1023&dotrans=2991&hy=SZ&m=fe61ea9b87bdb3f1aae648d781fba17a"
}
这样就可以直接播放或下载视频了!
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/126865.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...