业界动态
python抓取抖音热门视频_用于抓取抖音热门视频和音乐的API
2024-11-02 02:04

:项目已不可用...

python抓取抖音热门视频_用于抓取抖音热门视频和音乐的API

DouYin

API of DouYin App for humans.

Installation

pip3 install douyin

Usage

Here is the sample code:

import douyin

from douyin.structures import Topic, Music

# define file handler and specify folder

video_file_handler = douyin.handlers.VideoFileHandler(folder='https://blog.csdn.net/weixin_39933713/article/details/videos')

music_file_handler = douyin.handlers.MusicFileHandler(folder='https://blog.csdn.net/weixin_39933713/article/details/musics')

# define mongodb handler

mongo_handler = douyin.handlers.MongoHandler()

# define downloader

downloader = douyin.downloaders.VideoDownloader([mongo_handler, video_file_handler, music_file_handler])

for result in douyin.hot.trend():

for item in result.data:

# download videos of topic/music for 100 max per

downloader.download(item.videos(max=100))

then you can get:

Item >

...

0%| | 0/10 [00:00, ?it/s]

Processing 1-10 of files

....

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6580510322468064526.mp4

10%|████▌ | 1/10 [00:01<00:16, 1.84s/it]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6516746291806997763.mp4

20%|█████████▏ | 2/10 [00:01<00:10, 1.33s/it]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6600742831352974596.mp4

40%|██████████████████▍ | 4/10 [00:02<00:05, 1.03it/s]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6484393014599879950.mp4

50%|███████████████████████ | 5/10 [00:02<00:04, 1.15it/s]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6616517521098935565.mp4

60%|███████████████████████████▌ | 6/10 [00:03<00:03, 1.27it/s]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6479958542747962637.mp4

70%|████████████████████████████████▏ | 7/10 [00:03<00:01, 1.68it/s]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6472305134377372941.mp4

80%|████████████████████████████████████▊ | 8/10 [00:03<00:00, 2.05it/s]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6562690160868199693.mp4

90%|█████████████████████████████████████████▍ | 9/10 [00:04<00:00, 2.27it/s]

Downloaded file to https://blog.csdn.net/weixin_39933713/article/details/videos/6500385230921141518.mp4

100%|█████████████████████████████████████████████| 10/10 [00:04<00:00, 2.33it/s]

    以上就是本篇文章【python抓取抖音热门视频_用于抓取抖音热门视频和音乐的API】的全部内容了,欢迎阅览 ! 文章地址:http://keair.bhha.com.cn/news/16.html 
     文章      相关文章      动态      同类文章      热门文章      栏目首页      网站地图      返回首页 康宝晨移动站 http://keair.bhha.com.cn/mobile/ , 查看更多   
最新文章
厦门三区小学一年级已经实现随迁子女公办学位自由?这些学校招收积分入学学生
近日六区公布积分入学学位积分入学学位剩余近日,六区公布可以提供给随迁子女积分入学的学位,今年总积分入学学位是18135+,之所
大动作!全球资管巨头抄底中国房地产
外资巨头宣布抄底中国资产,这次瞄准的是不动产。1全球资管巨头抄底中国房地产!全球资管巨头施罗德资本与浙江西子国际达成战略
韩国技术改造美国船厂,韩华称十年内实现年产10艘
【文/观察者网 山猫】去年年底,韩国韩华集团以1亿美元的价格在美国收购了一座原属于挪威业主的造船厂——费城造船厂,随即船厂
假山假景假脸,短剧《窃心》爆火,让多少内娱流水线民国剧脸红
今年的国剧市场如同过山车,从巅峰到谷底再重攀高峰,一路跌宕起伏。比如《藏海传》点燃整个国剧市场,引起全民追剧热潮,而本以
军事晚报AI速递:今日军事热点一览 丨2025年8月21日
  军事领域动态复杂,事件可能迅速改变全球安全格局。我们整理了今日最重要的军事新闻,包括关键行动和政策变化,让您清晰把握
原包PA66 GVS-5H 瑞士EMS 耐化学性
C-Cushioning Charm, Hermione spluttered, as Ron pulled her to her feet, but toHarrys horror he saw that she was no longe
征信逾期五年超十次?别慌!2025最新解密与攻略,速来抄作业!
征信逾期五年超十次?别慌!2025最新解密与攻略,速来抄作业!朋友你是不是也遇到过这类情况?征信逾期五年超十次,感觉天都塌了
SAB47减速机
上海弗麦传动机械有限公司 主要材料 1、箱体:铸铁; 2、齿轮:低碳合金钢,碳、氮共渗处理(精磨后保持齿面硬度HRC60,硬层厚度
九类危险品进口流程?
九类属于杂类,常见的UN3077 UN3082九类也是危险品里面最不危险品的一类全国有40%的危险品是从上海港进口的。危险品进口一定要提
乡村学校少年宫丨池淮镇中心小学:快乐不“打烊” 相伴共成长
学校依托“乐善课程体系”,深入挖掘乡土特色,立足学情,开设了“棋”思妙想、“鼓乐”铿锵、“武”动奇迹、“琴”声悠扬、“足