当前位置:网站首页>b站视频链接快速获取
b站视频链接快速获取
2022-07-06 12:56:00 【聆听我的召唤,菜鸟进化】
from lxml import etree
import time
import json
import requests
import csv
import random
import os
from fake_useragent import UserAgent
headers={
'User-Agent':UserAgent().random
}
for i in range(1,35):
url='https://api.bilibili.com/x/web-interface/search/type?__refresh__=true&_extra=&context=&page={}&page_size=42&from_source=&from_spmid=333.337&platform=pc&highlight=1&single_column=0&keyword=%E8%8E%8E%E5%A3%AB%E6%AF%94%E4%BA%9A%E6%88%8F%E5%89%A7%E8%A1%A8%E6%BC%94&category_id=&search_type=video&dynamic_offset=72&preload=true&com2co=true'.format(i)
response=requests.get(url=url,headers=headers)
data=response.json()
cards=data['data']['result']
print(i)
for card in cards:
li=[]
link=card["arcurl"]#评分
times=card["duration"]#影名
description=card["title"]#url
li.append(link)
li.append(times)
li.append(description)
print(li)
with open('biliok.csv', 'a', newline='', encoding='utf-8-sig') as fp:
writer = csv.writer(fp)
writer.writerow(li)
time.sleep(float(format(random.uniform(0,3), '.2f')))
边栏推荐
- Word bag model and TF-IDF
- Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
- Simple continuous viewing PTA
- OAI 5g nr+usrp b210 installation and construction
- Common English vocabulary that every programmer must master (recommended Collection)
- 请问sql group by 语句问题
- Le langage r visualise les relations entre plus de deux variables de classification (catégories), crée des plots Mosaiques en utilisant la fonction Mosaic dans le paquet VCD, et visualise les relation
- el-table表格——sortable排序 & 出现小数、%时排序错乱
- Mtcnn face detection
- Redis insert data garbled solution
猜你喜欢
全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎
Statistical inference: maximum likelihood estimation, Bayesian estimation and variance deviation decomposition
SAP UI5 框架的 manifest.json
No Yum source to install SPuG monitoring
【深度学习】PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
Swagger UI tutorial API document artifact
Redis insert data garbled solution
Aike AI frontier promotion (7.6)
Interviewer: what is the internal implementation of ordered collection in redis?
OneNote in-depth evaluation: using resources, plug-ins, templates
随机推荐
El table table - sortable sorting & disordered sorting when decimal and% appear
Swagger UI教程 API 文档神器
分糖果
In JS, string and array are converted to each other (II) -- the method of converting array into string
OneNote 深度评测:使用资源、插件、模版
Forward maximum matching method
什么是RDB和AOF
'class file has wrong version 52.0, should be 50.0' - class file has wrong version 52.0, should be 50.0
如何实现常见框架
R語言可視化兩個以上的分類(類別)變量之間的關系、使用vcd包中的Mosaic函數創建馬賽克圖( Mosaic plots)、分別可視化兩個、三個、四個分類變量的關系的馬賽克圖
代理和反向代理
Pinduoduo lost the lawsuit, and the case of bargain price difference of 0.9% was sentenced; Wechat internal test, the same mobile phone number can register two account functions; 2022 fields Awards an
document.write()的用法-写入文本——修改样式、位置控制
Seven original sins of embedded development
正则表达式收集
R language visualizes the relationship between more than two classification (category) variables, uses mosaic function in VCD package to create mosaic plots, and visualizes the relationship between tw
启动嵌入式间:资源有限的系统启动
2017 8th Blue Bridge Cup group a provincial tournament
Reinforcement learning - learning notes 5 | alphago
document. Usage of write () - write text - modify style and position control