需要的包

from lxml import etree
import re
import json
import requests

《神盾局特工 第七季》资源突然没了,请将17578替换成《妙警贼探 第一季》ID 126

(1) 获取所有视频名

第(2)步需要视频名作为 POST 请求的参数。

方法1:

以人人视频《神盾局特工 第七季》播放页 http://m.rr.tv/detail/17578 为例,其中 17578 为这一季的 id 。接着以这个 URL 发送 一个 POST 请求来获取这个页面的 HTML 源代码。

video_detail_url = "http://m.rr.tv/detail/17578"
video_detail = requests.post(video_detail_url).content
print(video_detail)

获取的 HTML 源代码如下:

b'<!doctype html>\n<html data-n-head-ssr lang="zh-CN">\n  <script>!function(i,e){var t,a=i.document,r=a.documentElement,n=a.querySelector(\'meta[name="viewport"]\'),o=a.querySelector(\'meta[name="flexible"]\'),l=0,m=0,s=e.flexible||(e.flexible={});if(n){console.warn("\xe5\xb0\x86\xe6\xa0\xb9\xe6\x8d\xae\xe5\xb7\xb2\xe6\x9c\x89\xe7\x9a\x84meta\xe6\xa0\x87\xe7\xad\xbe\xe6\x9d\xa5\xe8\xae\xbe\xe7\xbd\xae\xe7\xbc\xa9\xe6\x94\xbe\xe6\xaf\x94\xe4\xbe\x8b");var d=n.getAttribute("content").match(/initial\\-scale=([\\d\\.]+)/);d&&(m=parseFloat(d[1]),l=parseInt(1/m))}else if(o){var p=o.getAttribute("content");if(p){var c=p.match(/initial\\-dpr=([\\d\\.]+)/),u=p.match(/maximum\\-dpr=([\\d\\.]+)/);c&&(l=parseFloat(c[1]),m=parseFloat((1/l).toFixed(2))),u&&(l=parseFloat(u[1]),m=parseFloat((1/l).toFixed(2)))}}if(!l&&!m){i.navigator.appVersion.match(/android/gi);var f=i.navigator.appVersion.match(/iphone/gi),v=i.devicePixelRatio;m=1/(l=f?3<=v&&(!l||3<=l)?3:2<=v&&(!l||2<=l)?2:1:1)}if(r.setAttribute("data-dpr",l),!n)if((n=a.createElement("meta")).setAttribute("name","viewport"),n.setAttribute("content","initial-scale="+m+", maximum-scale="+m+", minimum-scale="+m+", user-scalable=no"),r.firstElementChild)r.firstElementChild.appendChild(n);else{var h=a.createElement("div");h.appendChild(n),a.write(h.innerHTML)}function x(){var e=r.getBoundingClientRect().width;540<e/l&&(e=540*l);var t=e/10;r.style.fontSize=t+"px",s.rem=i.rem=t}i.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(x,300)},!1),i.addEventListener("pageshow",function(e){e.persisted&&(clearTimeout(t),t=setTimeout(x,300))},!1),"complete"===a.readyState?a.body.style.fontSize=12*l+"px":a.addEventListener("DOMContentLoaded",function(e){a.body.style.fontSize=12*l+"px"},!1),x(),s.dpr=i.dpr=l,s.refreshRem=x,s.rem2px=function(e){var t=parseFloat(e)*this.rem;return"string"==typeof e&&e.match(/rem$/)&&(t+="px"),t},s.px2rem=function(e){var t=parseFloat(e)/this.rem;return"string"==typeof e&&e.match(/px$/)&&(t+="rem"),t}}(window,window.lib||(window.lib={}))</script>\n  <head >\n    <title>\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5 \xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3 \xe4\xba\xba\xe4\xba\xba\xe8\xa7\x86\xe9\xa2\x91-\xe6\x8f\x90\xe4\xbe\x9b\xe8\x8b\xb1\xe7\xbe\x8e\xe6\x97\xa5\xe9\x9f\xa9\xe6\xb3\xb0\xe5\x89\xa7\xe7\x94\xb5\xe5\xbd\xb1\xe5\x9c\xa8\xe7\xba\xbf\xe8\xa7\x82\xe7\x9c\x8b</title><meta data-n-head="ssr" charset="utf-8"><meta data-n-head="ssr" name="keyword" content="\xe7\xbe\x8e\xe5\x89\xa7,\xe6\x97\xa5\xe5\x89\xa7,\xe9\x9f\xa9\xe5\x89\xa7,\xe6\xb3\xb0\xe5\x89\xa7,\xe5\x8f\xb0\xe5\x89\xa7,\xe7\x94\xb5\xe5\xbd\xb1,\xe4\xba\xba\xe4\xba\xba\xe7\xbe\x8e\xe5\x89\xa7,\xe4\xba\xba\xe4\xba\xba\xe5\xbd\xb1\xe8\xa7\x86,\xe5\xad\x97\xe5\xb9\x95\xe7\xbb\x84,\xe5\xa4\xa9\xe5\xa4\xa9\xe7\xbe\x8e\xe5\x89\xa7,\xe7\x88\xb1\xe7\xbe\x8e\xe5\x89\xa7,\xe7\xbe\x8e\xe5\x89\xa7tv,\xe7\xbe\x8e\xe5\x89\xa7\xe5\xa4\xa9\xe5\xa0\x82,\xe4\xba\xba\xe4\xba\xba\xe7\xbe\x8e\xe5\x89\xa7app,\xe5\xbd\xb1\xe8\xa7\x86\xe5\xa4\xa7\xe5\x85\xa8,\xe6\x9d\x80\xe6\xad\xbb\xe4\xbc\x8a\xe8\x8a\x99,\xe5\xa4\xab\xe5\xa6\xbb\xe7\x9a\x84\xe4\xb8\x96\xe7\x95\x8c,\xe6\x91\xa9\xe7\x99\xbb\xe5\xae\xb6\xe5\xba\xad,\xe8\xa5\xbf\xe9\x83\xa8\xe4\xb8\x96\xe7\x95\x8c,\xe5\x9b\xbd\xe7\x8e\x8b,\xe8\x89\xaf\xe5\x8c\xbb,\xe8\xa1\x8c\xe5\xb0\xb8\xe8\xb5\xb0\xe8\x82\x89,\xe7\x94\x9f\xe6\xb4\xbb\xe5\xa4\xa7\xe7\x88\x86\xe7\x82\xb8,\xe5\xb0\x8f\xe8\xb0\xa2\xe5\xb0\x94\xe9\xa1\xbf"><meta data-n-head="ssr" data-hid="description" name="description" content="\xe6\xbc\xab\xe5\xa8\x81\xe7\x9a\x84\xe7\x94\xb5\xe8\xa7\x86\xe5\x89\xa7\xe9\x9b\x86\xe3\x80\x8a\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5\xe3\x80\x8b\xe5\xb7\xb2\xe7\xbb\x8f\xe6\x92\xad\xe5\x87\xba\xe5\x88\xb0\xe4\xba\x86\xe7\xac\xac\xe4\xba\x94\xe5\xad\xa3\xef\xbc\x8c\xe5\xb0\xbd\xe7\xae\xa1\xe6\x94\xb6\xe8\xa7\x86\xe5\x9c\xa8\xe6\xbb\x91\xe8\x90\xbd\xef\xbc\x8c\xe4\xbd\x86\xe4\xbe\x9d\xe7\x84\xb6\xe6\x9c\x89\xe7\x9d\x80\xe5\x9d\x9a\xe5\xae\x9e\xe7\x9a\x84\xe6\x8b\xa5\xe8\xb6\xb8\xe3\x80\x82\xe5\x90\x8c\xe6\x97\xb6\xef\xbc\x8c\xe6\x8f\x90\xe5\x89\x8d\xe7\xbb\xad\xe8\xae\xa2\xe4\xb9\x9f\xe8\x83\xbd\xe5\xb0\xbd\xe6\x97\xa9\xe5\x92\x8c\xe9\xa5\xb0\xe6\xbc\x94\xe9\x87\x8d\xe8\xa6\x81\xe8\xa7\x92\xe8\x89\xb2\xe7\x9a\x84\xe6\xbc\x94\xe5\x91\x98\xe7\xad\xbe\xe8\xae\xa2\xe5\x90\x88\xe5\x90\x8c\xef\xbc\x8c\xe6\x9c\x89\xe5\x88\xa9\xe9\x99\x8d\xe4\xbd\x8e\xe6\x88\x90\xe6\x9c\xac\xef\xbc\x8c\xe5\x9f\xba\xe4\xba\x8e\xe4\xbb\xa5\xe4\xb8\x8a\xe8\x80\x83\xe8\x99\x91\xef\xbc\x8cABC\xe7\xa1\xae\xe5\xae\x9a\xe7\xbb\xad\xe8\xae\xa2\xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3\xef\xbc\x8c\xe9\xa2\x84\xe8\xae\xa1\xe4\xbe\x9d\xe6\x97\xa7\xe6\x98\xaf13\xe9\x9b\x86\xe3\x80\x82"><link data-n-head="ssr" rel="icon" type="image/x-icon" href="/favicon.ico"><link data-n-head="ssr" rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1759697_x73higra8de.css"><script data-n-head="ssr" src="https://cdn.rr.tv/vue/2.6.11/vue.min.js"></script><script data-n-head="ssr" src="https://cdn.rr.tv/vue-router/3.1.3/vue-router.min.js"></script><script data-n-head="ssr" src="https://cdn.rr.tv/better-scroll/1.15.2/bscroll.min.js"></script><link rel="preload" href="/_nuxt/f2f46b93aa432831436b.css" as="style"><link rel="preload" href="/_nuxt/2e3e79422d437e1b1ca6.js" as="script"><link rel="preload" href="/_nuxt/a7b1540e53d79b4fbc53.css" as="style"><link rel="preload" href="/_nuxt/e7261d7ef891832f15d0.js" as="script"><link rel="stylesheet" href="/_nuxt/f2f46b93aa432831436b.css"><link rel="stylesheet" href="/_nuxt/a7b1540e53d79b4fbc53.css">\n    <script>if("m.rr.tv"===location.hostname){var _hmt=_hmt||[];!function(){var t=document.createElement("script");t.src="https://hm.baidu.com/hm.js?85257bdfc5553e0010d3024693c00b9c";var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(t,e)}()}</script>\n  </head>\n  <body >\n    <script>"m.rr.tv"===location.hostname&&function(c,b,d,a){with(c[a]||(c[a]={}),c[a].config={pid:"as2q8oup61@6b20213037e7d6a",appType:"web",imgUrl:"https://arms-retcode.aliyuncs.com/r.png?",sendResource:!0,enableLinkTrace:!0,behavior:!0,enableSPA:!0,useFmp:!0},b)with(body)with(insertBefore(createElement("script"),firstChild))setAttribute("crossorigin","",src=d)}(window,document,"https://retcode.alicdn.com/retcode/bl.js","__bl")</script>\n    <script>\n      if (location.search.indexOf(\'eruda\') > -1) {\n        var erudaScript = document.createElement("script");\n        erudaScript.src = "//cdn.jsdelivr.net/npm/eruda";\n        var s = document.getElementsByTagName("script")[0];\n        s.parentNode.insertBefore(erudaScript, s);\n        window.onload = () => {\n          eruda.init()\n        }\n      }\n    </script>\n    <div data-server-rendered="true" id="__nuxt"><!----><div id="__layout"><div><div class="top-bar"><div class="search-wrap"><div><div class="logo"></div></div><div class="search is-disabled"><i class="iconfont icon-web_sousuo"></i><label><input placeholder="\xe8\xaf\xb7\xe8\xbe\x93\xe5\x85\xa5\xe8\xa6\x81\xe6\x90\x9c\xe7\xb4\xa2\xe7\x9a\x84\xe5\x89\xa7" type="search" class="search-input"></label><!----></div><!----><a href="/screen" aria-label="to screen"><i class="iconfont icon-quanbufenlei"></i></a></div><div class="search-fixed"></div></div><main class="detail-wrap"><div class="seo-wrap"><h1>\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5 \xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3</h1><h2>\xe4\xba\xba\xe4\xba\xba\xe8\xa7\x86\xe9\xa2\x91-\xe6\x8f\x90\xe4\xbe\x9b\xe8\x8b\xb1\xe7\xbe\x8e\xe6\x97\xa5\xe9\x9f\xa9\xe6\xb3\xb0\xe5\x89\xa7\xe7\x94\xb5\xe5\xbd\xb1\xe5\x9c\xa8\xe7\xba\xbf\xe8\xa7\x82\xe7\x9c\x8b</h2><h3>\xe6\xbc\xab\xe5\xa8\x81\xe7\x9a\x84\xe7\x94\xb5\xe8\xa7\x86\xe5\x89\xa7\xe9\x9b\x86\xe3\x80\x8a\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5\xe3\x80\x8b\xe5\xb7\xb2\xe7\xbb\x8f\xe6\x92\xad\xe5\x87\xba\xe5\x88\xb0\xe4\xba\x86\xe7\xac\xac\xe4\xba\x94\xe5\xad\xa3\xef\xbc\x8c\xe5\xb0\xbd\xe7\xae\xa1\xe6\x94\xb6\xe8\xa7\x86\xe5\x9c\xa8\xe6\xbb\x91\xe8\x90\xbd\xef\xbc\x8c\xe4\xbd\x86\xe4\xbe\x9d\xe7\x84\xb6\xe6\x9c\x89\xe7\x9d\x80\xe5\x9d\x9a\xe5\xae\x9e\xe7\x9a\x84\xe6\x8b\xa5\xe8\xb6\xb8\xe3\x80\x82\xe5\x90\x8c\xe6\x97\xb6\xef\xbc\x8c\xe6\x8f\x90\xe5\x89\x8d\xe7\xbb\xad\xe8\xae\xa2\xe4\xb9\x9f\xe8\x83\xbd\xe5\xb0\xbd\xe6\x97\xa9\xe5\x92\x8c\xe9\xa5\xb0\xe6\xbc\x94\xe9\x87\x8d\xe8\xa6\x81\xe8\xa7\x92\xe8\x89\xb2\xe7\x9a\x84\xe6\xbc\x94\xe5\x91\x98\xe7\xad\xbe\xe8\xae\xa2\xe5\x90\x88\xe5\x90\x8c\xef\xbc\x8c\xe6\x9c\x89\xe5\x88\xa9\xe9\x99\x8d\xe4\xbd\x8e\xe6\x88\x90\xe6\x9c\xac\xef\xbc\x8c\xe5\x9f\xba\xe4\xba\x8e\xe4\xbb\xa5\xe4\xb8\x8a\xe8\x80\x83\xe8\x99\x91\xef\xbc\x8cABC\xe7\xa1\xae\xe5\xae\x9a\xe7\xbb\xad\xe8\xae\xa2\xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3\xef\xbc\x8c\xe9\xa2\x84\xe8\xae\xa1\xe4\xbe\x9d\xe6\x97\xa7\xe6\x98\xaf13\xe9\x9b\x86\xe3\x80\x82</h3></div><div class="video-wrap"><video src="" preload="none" webkit-playsinline="true" playsinline="true" x5-video-player-type="h5" controlslist="nodownload" controls="controls"></video><div class="cover"><img src="https://img.rr.tv/cover/20200427/o_1587970354999.jpg?imageMogr2/gravity/Center/thumbnail/562x/crop/562x316/interlace/1/background/Z3JheQ==/ignore-error/1" alt="cover"><div class="cover-bg"></div><i class="iconfont icon-bofang1"></i></div></div><div class="info"><!----><div class="title"><h1 class="title-text">\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5 \xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3</h1><div class="toggle"><i class="iconfont icon-zhankai2"></i></div></div><div class="other-info"><div class="scroce">9.5</div><div class="divide">|</div><div class="type-area-cagegory">2020-05-27/\xe7\xbe\x8e\xe5\x9b\xbd/\xe5\x89\xa7\xe6\x83\x85 / \xe5\x8a\xa8\xe4\xbd\x9c / \xe7\xa7\x91\xe5\xb9\xbb / \xe6\x83\x8a\xe6\x82\x9a / \xe5\x86\x92\xe9\x99\xa9</div></div><div class="desc">\xe6\xbc\xab\xe5\xa8\x81\xe7\x9a\x84\xe7\x94\xb5\xe8\xa7\x86\xe5\x89\xa7\xe9\x9b\x86\xe3\x80\x8a\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5\xe3\x80\x8b\xe5\xb7\xb2\xe7\xbb\x8f\xe6\x92\xad\xe5\x87\xba\xe5\x88\xb0\xe4\xba\x86\xe7\xac\xac\xe4\xba\x94\xe5\xad\xa3\xef\xbc\x8c\xe5\xb0\xbd\xe7\xae\xa1\xe6\x94\xb6\xe8\xa7\x86\xe5\x9c\xa8\xe6\xbb\x91\xe8\x90\xbd\xef\xbc\x8c\xe4\xbd\x86\xe4\xbe\x9d\xe7\x84\xb6\xe6\x9c\x89\xe7\x9d\x80\xe5\x9d\x9a\xe5\xae\x9e\xe7\x9a\x84\xe6\x8b\xa5\xe8\xb6\xb8\xe3\x80\x82\xe5\x90\x8c\xe6\x97\xb6\xef\xbc\x8c\xe6\x8f\x90\xe5\x89\x8d\xe7\xbb\xad\xe8\xae\xa2\xe4\xb9\x9f\xe8\x83\xbd\xe5\xb0\xbd\xe6\x97\xa9\xe5\x92\x8c\xe9\xa5\xb0\xe6\xbc\x94\xe9\x87\x8d\xe8\xa6\x81\xe8\xa7\x92\xe8\x89\xb2\xe7\x9a\x84\xe6\xbc\x94\xe5\x91\x98\xe7\xad\xbe\xe8\xae\xa2\xe5\x90\x88\xe5\x90\x8c\xef\xbc\x8c\xe6\x9c\x89\xe5\x88\xa9\xe9\x99\x8d\xe4\xbd\x8e\xe6\x88\x90\xe6\x9c\xac\xef\xbc\x8c\xe5\x9f\xba\xe4\xba\x8e\xe4\xbb\xa5\xe4\xb8\x8a\xe8\x80\x83\xe8\x99\x91\xef\xbc\x8cABC\xe7\xa1\xae\xe5\xae\x9a\xe7\xbb\xad\xe8\xae\xa2\xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3\xef\xbc\x8c\xe9\xa2\x84\xe8\xae\xa1\xe4\xbe\x9d\xe6\x97\xa7\xe6\x98\xaf13\xe9\x9b\x86\xe3\x80\x82</div><div class="user-wrap"><div class="user-info"><img alt="\xe5\xa4\xb4\xe5\x83\x8f" class="avater"><div class="nickname">Maxwell1231</div></div><div class="tip"><div class="tag"><div class="tag-text">APP\xe7\x9c\x8b</div><div class="ang"></div></div><div class="btn">\xe5\x8e\x9f\xe7\x94\xbb</div></div></div></div><div class="episodes"><div class="subtitle pdlr21 episode-title" style="margin-top:20.5px">\xe9\x80\x89\xe9\x9b\x86</div><ul class="episode-list"><li>1</li><li>2</li><li>3</li><!----></ul></div><div class="recommends"><div class="subtitle pdlr21">\xe6\x9b\xb4\xe5\xa4\x9a\xe6\x8e\xa8\xe8\x8d\x90</div><div class="recommend-list"><div class="season-card-container season-item" data-v-194f6b87><div class="season-card" data-v-194f6b87><div class="season-cover" data-v-194f6b87><!----></div><div class="season-action-bar" data-v-194f6b87><div class="season-action-bar-left" data-v-194f6b87><div class="season-action-bar-left-text" data-v-194f6b87>\xe7\xac\xac1\xe5\xad\xa3</div></div><!----></div></div><div class="title-desc season-card-title-desc" style="margin-top:6px;" data-v-9b0b9e8a data-v-194f6b87><div class="milk-title" style="-webkit-line-clamp:1;" data-v-9b0b9e8a>\xe6\x9d\xb0\xe8\xa5\xbf\xe5\x8d\xa1\xc2\xb7\xe7\x90\xbc\xe6\x96\xaf\xe7\xac\xac\xe4\xb8\x80\xe5\xad\xa3</div><div class="desc" data-v-9b0b9e8a><div class="span" style="display: inline;margin-right: 3px;color: #00BBFF;font-weight: bold" data-v-9b0b9e8a>7.5</div><div class="a" style="display: inline" data-v-9b0b9e8a>\xe5\x89\xa7\xe6\x83\x85/\xe5\x8a\xa8\xe4\xbd\x9c</div></div></div></div><div class="season-card-container season-item" data-v-194f6b87><div class="season-card" data-v-194f6b87><div class="season-cover" data-v-194f6b87><!----></div><div class="season-action-bar" data-v-194f6b87><div class="season-action-bar-left" data-v-194f6b87><div class="season-action-bar-left-text" data-v-194f6b87>\xe7\xac\xac7\xe5\xad\xa3</div></div><!----></div></div><div class="title-desc season-card-title-desc" style="margin-top:6px;" data-v-9b0b9e8a data-v-194f6b87><div class="milk-title" style="-webkit-line-clamp:1;" data-v-9b0b9e8a>\xe8\xaf\x86\xe9\xaa\xa8\xe5\xaf\xbb\xe8\xb8\xaa \xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3</div><div class="desc" data-v-9b0b9e8a><div class="span" style="display: inline;margin-right: 3px;color: #00BBFF;font-weight: bold" data-v-9b0b9e8a>8.9</div><div class="a" style="display: inline" data-v-9b0b9e8a>\xe5\x89\xa7\xe6\x83\x85 / \xe7\x88\xb1\xe6\x83\x85 / \xe6\x82\xac\xe7\x96\x91 / \xe7\x8a\xaf\xe7\xbd\xaa</div></div></div></div><div class="season-card-container season-item" data-v-194f6b87><div class="season-card" data-v-194f6b87><div class="season-cover" data-v-194f6b87><!----></div><div class="season-action-bar" data-v-194f6b87><div class="season-action-bar-left" data-v-194f6b87><div class="season-action-bar-left-text" data-v-194f6b87>\xe7\xac\xac2\xe5\xad\xa3</div></div><!----></div></div><div class="title-desc season-card-title-desc" style="margin-top:6px;" data-v-9b0b9e8a data-v-194f6b87><div class="milk-title" style="-webkit-line-clamp:1;" data-v-9b0b9e8a>\xe7\xbd\x97\xe9\xa9\xac \xe7\xac\xac\xe4\xba\x8c\xe5\xad\xa3</div><div class="desc" data-v-9b0b9e8a><div class="span" style="display: inline;margin-right: 3px;color: #00BBFF;font-weight: bold" data-v-9b0b9e8a>8.9</div><div class="a" style="display: inline" data-v-9b0b9e8a>\xe5\x89\xa7\xe6\x83\x85 / \xe5\x8a\xa8\xe4\xbd\x9c / \xe7\x88\xb1\xe6\x83\x85 / \xe5\x8e\x86\xe5\x8f\xb2 / \xe6\x88\x98\xe4\xba\x89</div></div></div></div><div class="season-card-container season-item" data-v-194f6b87><div class="season-card" data-v-194f6b87><div class="season-cover" data-v-194f6b87><!----></div><div class="season-action-bar" data-v-194f6b87><div class="season-action-bar-left" data-v-194f6b87><div class="season-action-bar-left-text" data-v-194f6b87>\xe7\xac\xac1\xe5\xad\xa3</div></div><!----></div></div><div class="title-desc season-card-title-desc" style="margin-top:6px;" data-v-9b0b9e8a data-v-194f6b87><div class="milk-title" style="-webkit-line-clamp:1;" data-v-9b0b9e8a>\xe9\x9f\xb3\xe4\xb9\x90\xe7\x8e\xa9\xe5\xae\xb6 \xe7\xac\xac\xe4\xb8\x80\xe5\xad\xa3</div><div class="desc" data-v-9b0b9e8a><div class="span" style="display: inline;margin-right: 3px;color: #00BBFF;font-weight: bold" data-v-9b0b9e8a>8.9</div><div class="a" style="display: inline" data-v-9b0b9e8a>\xe5\x96\x9c\xe5\x89\xa7 / \xe5\xae\xb6\xe5\xba\xad</div></div></div></div><div class="season-card-container season-item" data-v-194f6b87><div class="season-card" data-v-194f6b87><div class="season-cover" data-v-194f6b87><!----></div><div class="season-action-bar" data-v-194f6b87><div class="season-action-bar-left" data-v-194f6b87><div class="season-action-bar-left-text" data-v-194f6b87>\xe7\xac\xac2\xe5\xad\xa3</div></div><!----></div></div><div class="title-desc season-card-title-desc" style="margin-top:6px;" data-v-9b0b9e8a data-v-194f6b87><div class="milk-title" style="-webkit-line-clamp:1;" data-v-9b0b9e8a>\xe9\xa1\xb6\xe7\xba\xa7\xe5\xa4\xa7\xe5\x8e\xa8\xef\xbc\x9a\xe7\x94\x9c\xe8\x9c\x9c\xe4\xb8\x96\xe7\x95\x8c \xe7\xac\xac\xe4\xba\x8c\xe5\xad\xa3</div><div class="desc" data-v-9b0b9e8a><div class="span" style="display: inline;margin-right: 3px;color: #00BBFF;font-weight: bold" data-v-9b0b9e8a>8.0</div><div class="a" style="display: inline" data-v-9b0b9e8a>\xe7\xbe\x8e\xe9\xa3\x9f\xe7\x9c\x9f\xe4\xba\xba\xe7\xa7\x80</div></div></div></div></div></div></main></div></div></div><script>window.__NUXT__=(function(a,b,c,d,e,f,g,h){return {layout:"default",data:[{area:"\xe7\xbe\x8e\xe5\x9b\xbd",cover3Url:"https:\\u002F\\u002Fimg.rr.tv\\u002Fcover\\u002F20200427\\u002Fo_1587970354999.jpg",coverUrl:"https:\\u002F\\u002Fimg.rr.tv\\u002FseasonCover\\u002F20200604\\u002Fo_1591259918932.png",desc:"\xe6\xbc\xab\xe5\xa8\x81\xe7\x9a\x84\xe7\x94\xb5\xe8\xa7\x86\xe5\x89\xa7\xe9\x9b\x86\xe3\x80\x8a\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5\xe3\x80\x8b\xe5\xb7\xb2\xe7\xbb\x8f\xe6\x92\xad\xe5\x87\xba\xe5\x88\xb0\xe4\xba\x86\xe7\xac\xac\xe4\xba\x94\xe5\xad\xa3\xef\xbc\x8c\xe5\xb0\xbd\xe7\xae\xa1\xe6\x94\xb6\xe8\xa7\x86\xe5\x9c\xa8\xe6\xbb\x91\xe8\x90\xbd\xef\xbc\x8c\xe4\xbd\x86\xe4\xbe\x9d\xe7\x84\xb6\xe6\x9c\x89\xe7\x9d\x80\xe5\x9d\x9a\xe5\xae\x9e\xe7\x9a\x84\xe6\x8b\xa5\xe8\xb6\xb8\xe3\x80\x82\xe5\x90\x8c\xe6\x97\xb6\xef\xbc\x8c\xe6\x8f\x90\xe5\x89\x8d\xe7\xbb\xad\xe8\xae\xa2\xe4\xb9\x9f\xe8\x83\xbd\xe5\xb0\xbd\xe6\x97\xa9\xe5\x92\x8c\xe9\xa5\xb0\xe6\xbc\x94\xe9\x87\x8d\xe8\xa6\x81\xe8\xa7\x92\xe8\x89\xb2\xe7\x9a\x84\xe6\xbc\x94\xe5\x91\x98\xe7\xad\xbe\xe8\xae\xa2\xe5\x90\x88\xe5\x90\x8c\xef\xbc\x8c\xe6\x9c\x89\xe5\x88\xa9\xe9\x99\x8d\xe4\xbd\x8e\xe6\x88\x90\xe6\x9c\xac\xef\xbc\x8c\xe5\x9f\xba\xe4\xba\x8e\xe4\xbb\xa5\xe4\xb8\x8a\xe8\x80\x83\xe8\x99\x91\xef\xbc\x8cABC\xe7\xa1\xae\xe5\xae\x9a\xe7\xbb\xad\xe8\xae\xa2\xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3\xef\xbc\x8c\xe9\xa2\x84\xe8\xae\xa1\xe4\xbe\x9d\xe6\x97\xa7\xe6\x98\xaf13\xe9\x9b\x86\xe3\x80\x82",episodes:[{episodeNo:c,key:"047c54d62cfc400e86eb66feeeff2c44\\u002Fbb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4",label:d,sid:"169105"},{episodeNo:a,key:"c29ec75c18a2475685bc8ae97587e52e\\u002F95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4",label:d,sid:"169285"},{episodeNo:3,key:"7cda8b6ee39f4eb6851ee6023df7b344\\u002F27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4",label:"3 \xe9\xa2\x84\xe5\x91\x8a",sid:"171248"}],id:17578,plots:"\xe5\x89\xa7\xe6\x83\x85 \\u002F \xe5\x8a\xa8\xe4\xbd\x9c \\u002F \xe7\xa7\x91\xe5\xb9\xbb \\u002F \xe6\x83\x8a\xe6\x82\x9a \\u002F \xe5\x86\x92\xe9\x99\xa9",recommends:[{coverUrl:"https:\\u002F\\u002Fimg.rr.tv\\u002Fvideo\\u002F20151121\\u002Fo_1448036680444.jpg",id:595,plots:"\xe5\x89\xa7\xe6\x83\x85\\u002F\xe5\x8a\xa8\xe4\xbd\x9c",score:7.5,seasonNo:c,title:"\xe6\x9d\xb0\xe8\xa5\xbf\xe5\x8d\xa1\xc2\xb7\xe7\x90\xbc\xe6\x96\xaf\xe7\xac\xac\xe4\xb8\x80\xe5\xad\xa3"},{coverUrl:"https:\\u002F\\u002Fimg.rr.tv\\u002Fvideo\\u002F20160117\\u002Fo_1453016562195.jpg",id:1034,plots:"\xe5\x89\xa7\xe6\x83\x85 \\u002F \xe7\x88\xb1\xe6\x83\x85 \\u002F \xe6\x82\xac\xe7\x96\x91 \\u002F \xe7\x8a\xaf\xe7\xbd\xaa",score:e,seasonNo:f,title:"\xe8\xaf\x86\xe9\xaa\xa8\xe5\xaf\xbb\xe8\xb8\xaa \xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3"},{coverUrl:"https:\\u002F\\u002Fimg.rr.tv\\u002Fvideo\\u002F20160328\\u002Fo_1459144588090.jpg",id:1455,plots:"\xe5\x89\xa7\xe6\x83\x85 \\u002F \xe5\x8a\xa8\xe4\xbd\x9c \\u002F \xe7\x88\xb1\xe6\x83\x85 \\u002F \xe5\x8e\x86\xe5\x8f\xb2 \\u002F \xe6\x88\x98\xe4\xba\x89",score:e,seasonNo:a,title:"\xe7\xbd\x97\xe9\xa9\xac \xe7\xac\xac\xe4\xba\x8c\xe5\xad\xa3"},{coverUrl:"https:\\u002F\\u002Fimg.rr.tv\\u002Fseason\\u002F20160623\\u002Fo_1466648073824.jpg",id:1749,plots:"\xe5\x96\x9c\xe5\x89\xa7 \\u002F \xe5\xae\xb6\xe5\xba\xad",score:e,seasonNo:c,title:"\xe9\x9f\xb3\xe4\xb9\x90\xe7\x8e\xa9\xe5\xae\xb6 \xe7\xac\xac\xe4\xb8\x80\xe5\xad\xa3"},{coverUrl:"http:\\u002F\\u002Fimg.rr.tv\\u002Falbum\\u002F20180704\\u002Fo_1530673470273.png",id:12572,plots:"\xe7\xbe\x8e\xe9\xa3\x9f\xe7\x9c\x9f\xe4\xba\xba\xe7\xa7\x80",score:8,seasonNo:a,title:"\xe9\xa1\xb6\xe7\xba\xa7\xe5\xa4\xa7\xe5\x8e\xa8\xef\xbc\x9a\xe7\x94\x9c\xe8\x9c\x9c\xe4\xb8\x96\xe7\x95\x8c \xe7\xac\xac\xe4\xba\x8c\xe5\xad\xa3"}],score:9.5,seasonNo:f,title:"\xe7\xa5\x9e\xe7\x9b\xbe\xe5\xb1\x80\xe7\x89\xb9\xe5\xb7\xa5 \xe7\xac\xac\xe4\xb8\x83\xe5\xad\xa3",total:13,upInfo:a,uploader:{avatarUrl:"https:\\u002F\\u002Fq.qlogo.cn\\u002Fqqapp\\u002F1104596499\\u002FA1E7592242144DA196978F10A6EF3D2F\\u002F100",nickName:"Maxwell1231"},year:"2020-05-27"}],fetch:[],error:null,state:{network:{loading:b},scrolltop:{HomeTop:g,ScreenTop:g,gotoHome:b},searchbar:{keyword:d,hotKeywordList:[],searchSeasonLoading:b,searchThinkLoading:b,thinkList:[],resultList:[],isThink:h}},serverRendered:h,routePath:"\\u002Fdetail\\u002F17578"}}(2,false,1,"",8.899999618530273,7,0,true));</script><script src="/_nuxt/2e3e79422d437e1b1ca6.js" defer></script><script src="/_nuxt/e7261d7ef891832f15d0.js" defer></script>\n  </body>\n</html>\n'

将获取的 HTML 源代码通过 lxml 这个第三方库转化为树形结构,然后通过 xpath 定位来获取需要的数据。注意:etree.HTML方法需要添加 parser=etree.HTMLParser(encoding='utf-8') 这个参数,否则数据中的中文会出现乱码。

content = etree.HTML(video_detail, parser=etree.HTMLParser(encoding='utf-8'))
script_text = content.xpath('/html/body/script[3]/text()')
print(script_text[0])

通过 xpath 只能获取以下数据,无法精准定位到<script>标签里面的字段:

window.__NUXT__=(function(a,b,c,d,e,f,g,h){return {layout:"default",data:[{area:"美国",cover3Url:"https:\u002F\u002Fimg.rr.tv\u002Fcover\u002F20200427\u002Fo_1587970354999.jpg",coverUrl:"https:\u002F\u002Fimg.rr.tv\u002FseasonCover\u002F20200604\u002Fo_1591259918932.png",desc:"漫威的电视剧集《神盾局特工》已经播出到了第五季,尽管收视在滑落,但依然有着坚实的拥趸。同时,提前续订也能尽早和饰演重要角色的演员签订合同,有利降低成本,基于以上考虑,ABC确定续订第七季,预计依旧是13集。",
episodes:[{
episodeNo:c,
key:"047c54d62cfc400e86eb66feeeff2c44\u002Fbb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4",label:d,sid:"169105"},
{episodeNo:a,
key:"c29ec75c18a2475685bc8ae97587e52e\u002F95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4",label:d,sid:"169285"},
{episodeNo:3,
key:"7cda8b6ee39f4eb6851ee6023df7b344\u002F27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4",label:"3 预告",sid:"171248"}],
id:17578,plots:"剧情 \u002F 动作 \u002F 科幻 \u002F 惊悚 \u002F 冒险",recommends:[{coverUrl:"https:\u002F\u002Fimg.rr.tv\u002Fvideo\u002F20151121\u002Fo_1448036680444.jpg",id:595,plots:"剧情\u002F动作",score:7.5,seasonNo:c,title:"杰西卡·琼斯第一季"},{coverUrl:"https:\u002F\u002Fimg.rr.tv\u002Fvideo\u002F20160117\u002Fo_1453016562195.jpg",id:1034,plots:"剧情 \u002F 爱情 \u002F 悬疑 \u002F 犯罪",score:e,seasonNo:f,title:"识骨寻踪 第七季"},{coverUrl:"https:\u002F\u002Fimg.rr.tv\u002Fvideo\u002F20160328\u002Fo_1459144588090.jpg",id:1455,plots:"剧情 \u002F 动作 \u002F 爱情 \u002F 历史 \u002F 战争",score:e,seasonNo:a,title:"罗马 第二季"},{coverUrl:"https:\u002F\u002Fimg.rr.tv\u002Fseason\u002F20160623\u002Fo_1466648073824.jpg",id:1749,plots:"喜剧 \u002F 家庭",score:e,seasonNo:c,title:"音乐玩家 第一季"},{coverUrl:"http:\u002F\u002Fimg.rr.tv\u002Falbum\u002F20180704\u002Fo_1530673470273.png",id:12572,plots:"美食真人秀",score:8,seasonNo:a,title:"顶级大厨:甜蜜世界 第二季"}],score:9.5,seasonNo:f,title:"神盾局特工 第七季",total:13,upInfo:a,uploader:{avatarUrl:"https:\u002F\u002Fq.qlogo.cn\u002Fqqapp\u002F1104596499\u002FA1E7592242144DA196978F10A6EF3D2F\u002F100",nickName:"Maxwell1231"},year:"2020-05-27"}],fetch:[],error:null,state:{network:{loading:b},scrolltop:{HomeTop:g,ScreenTop:g,gotoHome:b},searchbar:{keyword:d,hotKeywordList:[],searchSeasonLoading:b,searchThinkLoading:b,thinkList:[],resultList:[],isThink:h}},serverRendered:h,routePath:"\u002Fdetail\u002F17578"}}(2,false,1,"",8.899999618530273,7,0,true));

通过正则表达式匹配符合要求的所有字段。

episodes_keys = re.findall("key:\"(.*?),label", script_text[0])
print(episodes_keys)

这就是《神盾局特工 第七季》第1-3集的视频名,每隔一段时间就会变化:

['047c54d62cfc400e86eb66feeeff2c44\\u002Fbb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4"',
'c29ec75c18a2475685bc8ae97587e52e\\u002F95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4"',
'7cda8b6ee39f4eb6851ee6023df7b344\\u002F27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4"']

方法2:

偶然一次刷新播放页后发现了这个 API 接口,之后刷新好几次也都找不到这个接口了。建议使用这个方法 2 ,比方法 1 更简洁更稳定 ,方法 1 中的 xpath 路径可能会在源代码结构调整之后失效。

如方法 1 所述, 17578 为《神盾局特工 第七季》的 id,以 https://content.json.rr.tv/morpheus/detail/17578 这个 URL 发送 一个 POST 请求可获取到包含视频名的 json 格式的数据。

video_detail_url = "https://content.json.rr.tv/morpheus/detail/17578"
video_detail = requests.post(video_detail_url).json()
print(video_detail)

获取的 json 格式数据如下:

{'error': 'ok', 'result': {'area': '美国', 'cover3Url': 'https://img.rr.tv/cover/20200427/o_1587970354999.jpg', 'coverUrl': 'https://img.rr.tv/seasonCover/20200604/o_1591259918932.png', 'desc': '漫威的电视剧集《神盾局特工》已经播出到了第五季,尽管收视在滑落,但依然有着坚实的拥趸。同时,提前续订也能尽早和饰演重要角色的演员签订合同,有利降低成本,基于以上考虑,ABC确定续订第七季,预计依旧是13集。',
'episodes': [{'episodeNo': 1, 'key': '047c54d62cfc400e86eb66feeeff2c44/bb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4', 'label': '', 'sid': '169105'}, {'episodeNo': 2, 'key': 'c29ec75c18a2475685bc8ae97587e52e/95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4', 'label': '', 'sid': '169285'}, {'episodeNo': 3, 'key': '7cda8b6ee39f4eb6851ee6023df7b344/27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4', 'label': '3 预告', 'sid': '171248'}],
'id': 17578, 'plots': '剧情 / 动作 / 科幻 / 惊悚 / 冒险', 'recommends': [{'coverUrl': 'https://img.rr.tv/video/20151121/o_1448036680444.jpg', 'id': 595, 'plots': '剧情/动作', 'score': 7.5, 'seasonNo': 1, 'title': '杰西卡·琼斯第一季'}, {'coverUrl': 'https://img.rr.tv/video/20160117/o_1453016562195.jpg', 'id': 1034, 'plots': '剧情 / 爱情 / 悬疑 / 犯罪', 'score': 8.899999618530273, 'seasonNo': 7, 'title': '识骨寻踪 第七季'}, {'coverUrl': 'https://img.rr.tv/video/20160328/o_1459144588090.jpg', 'id': 1455, 'plots': '剧情 / 动作 / 爱情 / 历史 / 战争', 'score': 8.899999618530273, 'seasonNo': 2, 'title': '罗马 第二季'}, {'coverUrl': 'https://img.rr.tv/season/20160623/o_1466648073824.jpg', 'id': 1749, 'plots': '喜剧 / 家庭', 'score': 8.899999618530273, 'seasonNo': 1, 'title': '音乐玩家 第一季'}, {'coverUrl': 'http://img.rr.tv/album/20180704/o_1530673470273.png', 'id': 12572, 'plots': '美食真人秀', 'score': 8.0, 'seasonNo': 2, 'title': '顶级大厨:甜蜜世界 第二季'}], 'score': 9.5, 'seasonNo': 7, 'title': '神盾局特工 第七季', 'total': 13, 'upInfo': 2, 'uploader': {'avatarUrl': 'https://q.qlogo.cn/qqapp/1104596499/A1E7592242144DA196978F10A6EF3D2F/100', 'nickName': 'Maxwell1231'}, 'year': '2020-05-27'}, 'status': 0}

接下来直接通过 json 的 key 获取到对应的 value,每一个 value 即为一个视频名。

episodes = video_detail["result"]["episodes"]
episodes_keys = []
for i in range(len(episodes)):episodes_keys.append(video_detail["result"]["episodes"][i]["key"])
print(episodes_keys)

这就是《神盾局特工 第七季》第1-3集的视频名,每隔一段时间就会变化:

['047c54d62cfc400e86eb66feeeff2c44/bb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4',
'c29ec75c18a2475685bc8ae97587e52e/95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4',
'7cda8b6ee39f4eb6851ee6023df7b344/27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4']

(2)获取所有视频地址

https://web-api.rr.tv/watch/morpheus/v1/cdn/parser 这个 POST 请求需要提供视频名作为参数,来获取对应视频名的地址。

这个 POST 需要加入 headers 和 payload ,其中 headers 里有很多参数,可以删减掉对结果没影响的参数;payload 里的 keyNames 参数可以传入一个视频名,也可以传入多个视频名,传入一个则获取一个视频地址,传入多个则获取多个视频地址,我这里选择获取《神盾局特工 第七季》目前已更新的所有集的地址。

video_parser_url = "https://web-api.rr.tv/watch/morpheus/v1/cdn/parser"
headers = {"Content-Type": "application/json;charset=UTF-8",
}
payload = {'keyNames': episodes_keys
}
video_parser = requests.post(video_parser_url, data=json.dumps(payload), headers=headers).json()
print(video_parser)

获取的 json 格式数据如下:

{'status': 0, 'error': 'ok',
'result': {
'parserUrls': ['https://qn-cdn-web-local.rr.tv/047c54d62cfc400e86eb66feeeff2c44/bb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4?sign=0a2fc5eab71d7caf80e21de93dcc27d2&t=5edcd5e3', 'https://qn-cdn-web-local.rr.tv/c29ec75c18a2475685bc8ae97587e52e/95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4?sign=c70f654694a77df8819cd258a189330a&t=5edcd5e3', 'https://qn-cdn-web-local.rr.tv/7cda8b6ee39f4eb6851ee6023df7b344/27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4?sign=851f2888093448994cc1b2d1ce92c761&t=5edcd5e3']},
'request_id': ''}

接下来直接通过 json 的 key 获取到对应的 value,每一个 value 即为一个视频地址。

parserUrls = video_parser["result"]["parserUrls"]
print(parserUrls)

这就是《神盾局特工 第七季》第1-3集的视频地址,每隔一段时间就会变化,以下地址可能已失效,请允许代码获取最新视频地址:

['https://qn-cdn-web-local.rr.tv/047c54d62cfc400e86eb66feeeff2c44/bb9a71ae35fc45608a1a52467277b742-ffbb5c45cb01cd68d2b6b4fad657812a-sd.mp4?sign=0a2fc5eab71d7caf80e21de93dcc27d2&t=5edcd5e3',
'https://qn-cdn-web-local.rr.tv/c29ec75c18a2475685bc8ae97587e52e/95bd73179d874a9382f8bef163d530f9-14cef9f01d6ea71396a9fc68d7fd159f-sd.mp4?sign=c70f654694a77df8819cd258a189330a&t=5edcd5e3',
'https://qn-cdn-web-local.rr.tv/7cda8b6ee39f4eb6851ee6023df7b344/27d993ad5fbf4df3a6638c4b49dad7bf-3b758708e1f57cf5f012c8ffd8164ab6-sd.mp4?sign=851f2888093448994cc1b2d1ce92c761&t=5edcd5e3']

【python 爬虫】人人视频 API 接口解析相关推荐

  1. python实现简单的api接口-简单实现Python调用有道API接口(最新的)

    # ''' # Created on 2018-5-26 # # @author: yaoshuangqi # ''' import urllib.request import urllib.pars ...

  2. python免费领取视频-最经典Python爬虫全套视频免费领,带你从0开始学爬虫

    爬虫,是一种按照一定的规则,自动地抓取万维网信息的程序或者脚本.如果把整个互联网的数据比喻为一座宝藏,那爬虫就是来教大家如何来高效地挖掘这些宝藏.可以说,掌握了爬虫技能,你就成了所有互联网信息公司幕后 ...

  3. python爬虫 下载视频网站视频

    python爬虫 下载视频网站视频 xpath解析页面源码 requests.Session() 解决 status_code 302 网页重定向 selenium 获取网页遇到 iframe 标签解 ...

  4. 淘宝商品评价api接口(app、h5端),淘宝评论视频API接口,淘宝评论API接口

    淘宝商品评价api接口(app.h5端),淘宝评论视频API接口,淘宝评论API接口可以通过商品id,获取商品评价信息.评价内容.买家秀图片.评论浏览量.评价视频.评价追评等页面上展示的数据均可以拿到 ...

  5. 淘宝商品评价api接口,淘宝评论视频API接口,淘宝评论API接口(app、h5端)

    淘宝商品评价api接口,淘宝评论视频API接口,淘宝评论API接口(app.h5端)可通过商品id,获取商品评价信息.评价内容.买家秀图片.评论浏览量.评价视频.评价追评等页面上展示的数据均可以拿到, ...

  6. python实现简单的api接口-对Python实现简单的API接口实例讲解

    get方法 代码实现 # coding:utf-8 import json from urlparse import parse_qs from wsgiref.simple_server impor ...

  7. 用Python调用华为云API接口发短信

    [摘要] 用Python调用华为云API接口实现发短信,当然能给调用发短信接口前提条件是通过企业实名认证,而且有一个通过审核的短信签名,话不多说,showcode #!/usr/bin/python3 ...

  8. 简单python脚本实例-对Python实现简单的API接口实例讲解

    get方法 代码实现 # coding:utf-8 import json from urlparse import parse_qs from wsgiref.simple_server impor ...

  9. python爬虫 模拟登录人人网过程解析

    这篇文章主要介绍了python爬虫 模拟登录人人网过程解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 equests 提供了一个叫做sessio ...

最新文章

  1. 【经典算法】快速排序
  2. qlabel 边加载边更新_普及一下什么是超窄边液晶拼接屏
  3. Andorid SQLite数据库开发基础教程(3)
  4. MySQL高级-索引是个什么东西?explain到底怎么用-MySQL查询优化大全
  5. GDCM:检测SIEMENS JPEG无损压缩图像的测试程序
  6. 一键截图_教你一键为iPhone截图加上手机外壳,新技能快学起来!
  7. MSDN帮助文档 无法显示该网页 的问题解决方案(转)
  8. 十年技术骨干面试被开出一万五薪资,直呼 “这是对我的侮辱”
  9. 【SpringMVC框架】小结+视图解析器配置前缀和后缀
  10. mysql删除表外键_MySQL删除所有表的外键约束、禁用外键约束
  11. java web编码详解_Java Web 之编解码分析
  12. PCL Lesson1 :PCL库PCLVisualizer的简单使用
  13. Error: could not open `C:\Program Files\Java\jre6\lib\i386\jvm.cfg')
  14. msdtc.exe dll劫持
  15. python下面代码是什么意思_python的入门,代码,什么意思?
  16. 计算机病毒蓝屏,电脑中病毒造成蓝屏怎么解决
  17. 启动oracle时报错:PuTTY X11 proxy: unable to connect to forwarded X server: Network error:
  18. PHP 实现中文分词搜索功能
  19. setting多仓库写法
  20. Uncaught TypeError: Cannot read property ‘then‘ of undefined

热门文章

  1. 恩施好地方徒步旅游美不胜收
  2. VOD(视频点播技术)基本原理
  3. 【面试招聘】CampusShame:校招污点公司名单
  4. Mac小技巧:教你如何在Mac电脑打出command⌘、option⌥等特殊符号
  5. Pr:更改剪辑的速度和持续时间
  6. css 不多但够用(大概)
  7. 德州学院计算机系吧,德州学院计算机系教研室工作职责.doc
  8. 【计算机网络】总结篇
  9. 30岁转行软件测试靠谱吗?一个过来人的心路历程送给迷茫的你
  10. HashMap双层嵌套