小宇

小宇

暂无个人简介
阿克苏地区
网站开发
2028
新疆理工学院
网站开发

该用户非会员

会员专享项目教程/ 答疑等服务

大一学生很迷茫,学过python,有爬虫经验,做过静态网站,很迷茫不知道干什么,课也听不懂😔😔😔

这个微信开发工具界面怎么改成中文,求大佬求解

import requests from bs4 import BeautifulSoup # 定义Cookies cookies = { 'kpf': 'PC_WEB', 'clientid': '3', 'did': 'web_15e57618aee182da54fc254185c51566', 'didv': '1736656847676', 'kpn': 'KUAISHOU_VISION', } # 定义Headers headers = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', 'Accept-Language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6', 'Cache-Control': 'max-age=0', 'Connection': 'keep-alive', 'Referer': 'https://www.kuaishou.com/', 'Sec-Fetch-Dest': 'document', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-User': '?1', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0', 'sec-ch-ua': '"Not A(Brand";v="8", "Chromium";v="132", "Microsoft Edge";v="132"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Windows"', } # 定义搜索参数 params = { 'searchKey': '励志', } # 目标URL url = 'https://www.kuaishou.com/search' # 发送GET请求 try: response = requests.get(url, params=params, cookies=cookies, headers=headers) response.raise_for_status() # 检查请求是否成功 html_content = response.text # 使用BeautifulSoup解析HTML soup = BeautifulSoup(html_content, 'html.parser') # 根据快手的页面结构提取视频信息 # 这里需要根据实际的HTML结构进行调整 # 例如,假设每个视频在<div class="video-item">中 videos = soup.find_all('div', class_='video-item') for video in videos: title = video.find('a', class_='title').get_text(strip=True) link = video.find('a', class_='title')['href'] author = video.find('a', class_='author').get_text(strip=True) print(f"标题: {title}\n链接: https://www.kuaishou.com{link}\n作者: {author}\n") except requests.exceptions.HTTPError as http_err: print(f"HTTP错误: {http_err}") except Exception as err: print(f"其他错误: {err}") 求分析 我运行是空的

https://curlconverter.com/ 这个网站怎么用求大佬解惑

已经更新到最新版本了,还是没有网络这个选项的数据,也刷新了好多次,求大佬解惑

下载 APP