誰說Python不能爬取APP上面的資料?看我把快手視頻弄到手!

來源:互聯網
上載者:User

標籤:try   center   通過   使用者id   net   重啟   作者   enter   _id   

 

 

設定代理,重啟,下一步,查看本機ip

 

手機開啟網路設定

通過Proxy 伺服器;

設定好,重新整理快手app

 

看到請求,去找自己要用的,

非了九牛二虎之力找到了。

 

 

import requests,jsonurl=‘http://124.243.249.4/rest/n/feed/hot?appver=5.7.5.508&did=EB3C5966-C50E-432D-801E-D7EB42964654&c=a&ver=5.7&sys=ios9.3.5&mod=iPhone7%2C2&net=%E4%B8%AD%E5%9B%BD%E7%A7%BB%E5%8A%A8_5‘headers={ ‘Content-Type‘: ‘application/x-www-form-urlencoded‘, ‘Host‘: ‘124.243.205.129‘, ‘Accept-Language‘: ‘zh-Hans-CN;q=1‘}data={ ‘client_key‘:‘12‘, ‘coldStart‘:‘true‘, ‘count‘:‘20‘, ‘country_code‘:‘cn‘, ‘id‘:‘5‘, ‘language‘:‘zh-Hans-CN;q=1‘, ‘pv‘:‘false‘, ‘refreshTimes‘:‘0‘, ‘sig‘: ‘111‘, ‘source‘:‘1‘, ‘type‘:‘7‘}jso=requests.post(url,data=(data),headers=headers)list=jso.json()[‘feeds‘]for i in list: print(‘描述:%s‘%i[‘caption‘]) print(‘視頻串連:%s‘%i[‘main_mv_urls‘][0][‘url‘]) print(‘%s‘%i[‘user_name‘])print(‘使用者id:%s‘%i[‘user_id‘])

列印下我們輸出的

 

開啟串連。下載後就可以播放了。

 

然後這裡還可以根據返回的資訊去找視頻的評論。

仔細去分析,就能爬取到。

發燒影片,熱門圖片等都能爬取到。

進群:125240963   即可擷取數十套PDF書籍哦!

 

 

誰說Python不能爬取APP上面的資料?看我把快手視頻弄到手!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.