当前位置:网站首页>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')))
边栏推荐
- 如何实现常见框架
- Nodejs教程之Expressjs一篇文章快速入门
- 15million employees are easy to manage, and the cloud native database gaussdb makes HR office more efficient
- El table table - sortable sorting & disordered sorting when decimal and% appear
- Reinforcement learning - learning notes 5 | alphago
- MySQL - 事务(Transaction)详解
- Infrared thermometer based on STM32 single chip microcomputer (with face detection)
- document.write()的用法-写入文本——修改样式、位置控制
- None of the strongest kings in the monitoring industry!
- [MySQL] trigger
猜你喜欢

967- letter combination of telephone number

Swagger UI tutorial API document artifact

Introduction to the use of SAP Fiori application index tool and SAP Fiori tools

Common English vocabulary that every programmer must master (recommended Collection)

HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother

Set up a time server

审稿人dis整个研究方向已经不仅仅是在审我的稿子了怎么办?

爱可可AI前沿推介(7.6)

【滑动窗口】第九届蓝桥杯省赛B组:日志统计

968 edit distance
随机推荐
968 edit distance
Opencv learning example code 3.2.3 image binarization
SAP UI5 框架的 manifest.json
MySQL - 事务(Transaction)详解
JS operation DOM element (I) -- six ways to obtain DOM nodes
js 根据汉字首字母排序(省份排序) 或 根据英文首字母排序——za排序 & az排序
js中,字符串和数组互转(二)——数组转为字符串的方法
Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces
How do I remove duplicates from the list- How to remove duplicates from a list?
通过数字电视通过宽带网络取代互联网电视机顶盒应用
监控界的最强王者,没有之一!
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
Web开发小妙招:巧用ThreadLocal规避层层传值
None of the strongest kings in the monitoring industry!
OSPF多区域配置
038. (2.7) less anxiety
R language for text mining Part4 text classification
[redis design and implementation] part I: summary of redis data structure and objects
【论文解读】用于白内障分级/分类的机器学习技术
互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地