当前位置:网站首页>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')))
边栏推荐
猜你喜欢
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
【力扣刷题】32. 最长有效括号
Common English vocabulary that every programmer must master (recommended Collection)
缓存更新策略概览(Caching Strategies Overview)
Is it profitable to host an Olympic Games?
基于深度学习的参考帧生成
Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
Opencv learning example code 3.2.3 image binarization
Interviewer: what is the internal implementation of ordered collection in redis?
ICML 2022 | Flowformer: 任务通用的线性复杂度Transformer
随机推荐
14年本科毕业,转行软件测试,薪资13.5K
面试官:Redis中有序集合的内部实现方式是什么?
ICML 2022 | flowformer: task generic linear complexity transformer
跨分片方案 总结
Pat 1085 perfect sequence (25 points) perfect sequence
How do I remove duplicates from the list- How to remove duplicates from a list?
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
038. (2.7) less anxiety
R语言可视化两个以上的分类(类别)变量之间的关系、使用vcd包中的Mosaic函数创建马赛克图( Mosaic plots)、分别可视化两个、三个、四个分类变量的关系的马赛克图
2017 8th Blue Bridge Cup group a provincial tournament
代理和反向代理
Reviewer dis's whole research direction is not just reviewing my manuscript. What should I do?
Select data Column subset in table R [duplicate] - select subset of columns in data table R [duplicate]
在最长的距离二叉树结点
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
Regular expression collection
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
R语言做文本挖掘 Part4文本分类
KDD 2022 | 通过知识增强的提示学习实现统一的对话式推荐
Aiko ai Frontier promotion (7.6)