当前位置:网站首页>Quick access to video links at station B
Quick access to video links at station B
2022-07-06 21:19:00 【Listen to my call, rookie evolution】
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"]# score
times=card["duration"]# Movie title
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')))
边栏推荐
- Four common ways and performance comparison of ArrayList de duplication (jmh performance analysis)
- 20220211 failure - maximum amount of data supported by mongodb
- b站视频链接快速获取
- Web开发小妙招:巧用ThreadLocal规避层层传值
- 跨分片方案 总结
- [go][转载]vscode配置完go跑个helloworld例子
- Aiko ai Frontier promotion (7.6)
- document. Usage of write () - write text - modify style and position control
- 3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
- Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
猜你喜欢
OneNote 深度评测:使用资源、插件、模版
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
Interviewer: what is the internal implementation of ordered collection in redis?
愛可可AI前沿推介(7.6)
Reference frame generation based on deep learning
None of the strongest kings in the monitoring industry!
SAP Fiori应用索引大全工具和 SAP Fiori Tools 的使用介绍
Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces
Common English vocabulary that every programmer must master (recommended Collection)
Absolute primes (C language)
随机推荐
Pat 1078 hashing (25 points) ⼆ times ⽅ exploration method
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
JS学习笔记-OO创建怀疑的对象
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
Acdreamoj1110 (multiple backpacks)
20220211 failure - maximum amount of data supported by mongodb
Yyds dry goods count re comb this of arrow function
技术分享 | 抓包分析 TCP 协议
el-table表格——获取单击的是第几行和第几列 & 表格排序之el-table与sort-change、el-table-column与sort-method & 清除排序-clearSort
Seven original sins of embedded development
How do I remove duplicates from the list- How to remove duplicates from a list?
2022菲尔兹奖揭晓!首位韩裔许埈珥上榜,四位80后得奖,乌克兰女数学家成史上唯二获奖女性
R language for text mining Part4 text classification
跨分片方案 总结
JS operation DOM element (I) -- six ways to obtain DOM nodes
This year, Jianzhi Tencent
It's almost the new year, and my heart is lazy
038. (2.7) less anxiety
Manifest of SAP ui5 framework json
15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient