当前位置:网站首页>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')))
边栏推荐
- Aike AI frontier promotion (7.6)
- No Yum source to install SPuG monitoring
- LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
- js通过数组内容来获取数组下标
- 968 edit distance
- JS get array subscript through array content
- What's the best way to get TFS to output each project to its own directory?
- 2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history
- Select data Column subset in table R [duplicate] - select subset of columns in data table R [duplicate]
- Comprehensive evaluation and recommendation of the most comprehensive knowledge base management tools in the whole network: flowus, baklib, jiandaoyun, ones wiki, pingcode, seed, mebox, Yifang cloud,
猜你喜欢

KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning

PHP saves session data to MySQL database

爱可可AI前沿推介(7.6)

None of the strongest kings in the monitoring industry!

What is the problem with the SQL group by statement

Infrared thermometer based on STM32 single chip microcomputer (with face detection)

全网最全的知识库管理工具综合评测和推荐:FlowUs、Baklib、简道云、ONES Wiki 、PingCode、Seed、MeBox、亿方云、智米云、搜阅云、天翎

3D人脸重建:从基础知识到识别/重建方法!

Why do job hopping take more than promotion?

全网最全的新型数据库、多维表格平台盘点 Notion、FlowUs、Airtable、SeaTable、维格表 Vika、飞书多维表格、黑帕云、织信 Informat、语雀
随机推荐
968 edit distance
代理和反向代理
Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
Taylor series fast Fourier transform (FFT)
Variable star --- article module (1)
@GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
Huawei device command
js中,字符串和数组互转(二)——数组转为字符串的方法
Interviewer: what is the internal implementation of ordered collection in redis?
JS according to the Chinese Alphabet (province) or according to the English alphabet - Za sort &az sort
20220211 failure - maximum amount of data supported by mongodb
OAI 5g nr+usrp b210 installation and construction
Pycharm remote execution
字符串的使用方法之startwith()-以XX开头、endsWith()-以XX结尾、trim()-删除两端空格
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
正则表达式收集
2017 8th Blue Bridge Cup group a provincial tournament
[redis design and implementation] part I: summary of redis data structure and objects
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
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