github 直播開源項目(集成淘寶京東B站)
2023-09-24 05:39:52
20多個爬蟲實戰案例在開始之前,我建議你先安裝一下DecryptLoginExamples這個包,以方便測試下文中會逐一介紹到的各個爬蟲項目的調用代碼。具體而言,只需要執行如下命令即可:
pip install DecryptLoginExamples
1. 微博監控調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼, 'time_interval': 查詢微博動態的間隔時間,}crawler_executor = client.Clientcrawler_executor.executor('weibomonitor', config=config)
2. 生成QQ個人專屬報告調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, 'savedir': 生成的報告保存的文件夾,}crawler_executor = client.Clientcrawler_executor.executor('qqreports', config=config)
3. 下載B站指定UP主的所有視頻調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('bilibiliuservideos', config=config)
4. 網易雲個人歌單下載器調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('neteasesonglistdownloader', config=config)
5. 網易雲個人聽歌排行榜調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('neteaselistenleaderboard', config=config)
6. 下載指定微博用戶的所有微博數據調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼,}crawler_executor = client.Clientcrawler_executor.executor('userweibospider', config=config)
7. 網易雲音樂自動籤到調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('neteasesignin', config=config)
8. 微博表情包爬取調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼,}crawler_executor = client.Clientcrawler_executor.executor('weiboemoji', config=config)
9. 大吼一聲發微博調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼,}crawler_executor = client.Clientcrawler_executor.executor('weibosender', config=config)
10. 淘寶商品數據小爬蟲調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('tbgoods', config=config)
11. 京東商品數據小爬蟲調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('jdgoods', config=config)
12. 批量刪除微博調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼,}crawler_executor = client.Clientcrawler_executor.executor('delallweibos', config=config)
13. 批量刪除QQ空間說說調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('clearqzone', config=config)
14. 在終端看網易雲每日歌曲推薦調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('neteaseeveryday', config=config)
15. 網易雲音樂刷歌曲播放量調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, }crawler_executor = client.Clientcrawler_executor.executor('neteaseclickplaylist', config=config)
16. 天翼雲盤自動籤到 抽獎調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼,}crawler_executor = client.Clientcrawler_executor.executor('cloud189signin', config=config)
17. 中國大學MOOC下載器調用方式:
from DecryptLoginExamples import clientconfig = { 'url': 課程連結, 例如: https://www.icourse163.org/course/SJTU-1003381021, }crawler_executor = client.Clientcrawler_executor.executor('moocdl', config=config)
18. 修改小米運動中的步數調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼, 'steps': 想要刷到的目標步數,}crawler_executor = client.Clientcrawler_executor.executor('modifymihealthsteps', config=config)
19. 淘寶搶購腳本調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, 'trybuy_interval': 搶購商品時查詢商品是否可以購買的時間間隔(單位秒), 'server_key': Server醬的Key,}crawler_executor = client.Clientcrawler_executor.executor('taobaosnap', config=config)
20. 京東搶購腳本調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, 'trybuy_interval': 搶購商品時查詢商品是否可以購買的時間間隔(單位秒), 'server_key': Server醬的Key, 'paywd': 支付密碼, 部分商品需要支付密碼才能提交訂單, 輸入密碼不會導致你直接購買商品, 請放心使用,}crawler_executor = client.Clientcrawler_executor.executor('jingdongsnap', config=config)
21. B站UP主監控調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, 'up_ids': 監控的UP主ID, 例如: ['406756145'], 'time_interval': 查詢UP主的動態的間隔時間, 'server_key': Server醬的Key,}crawler_executor = client.Clientcrawler_executor.executor('bilibiliupmonitor', config=config)
22. B站監控關注的UP主並自動轉發抽獎調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用於存儲歷史cookies的唯一標識ID, 'time_interval': 查詢UP主的動態的間隔時間,}crawler_executor = client.Clientcrawler_executor.executor('bilibililottery', config=config)
23. 微博水軍調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼, 'targetid': 想要流量造假服務的明星微博ID, 例如: '1776448504',}crawler_executor = client.Clientcrawler_executor.executor('weibowater', config=config)
24. 微博批量拉黑腳本調用方式:
from DecryptLoginExamples import clientconfig = { 'username': 用戶名, 'password': 密碼, 'blacklist_ids': 想要批量拉黑的用戶列表, 例如: ['1776448504', '1792951112', '2656274875'],}crawler_executor = client.Clientcrawler_executor.executor('weiboblacklist', config=config)
,