| |
| import requests |
| |
| |
| cookies = { |
| 'JSESSIONID': 'ACC5D9245FC54596A57C4486CF2C0EA9', |
| 'HstCfa4602665': '1707702051444', |
| 'HstCla4602665': '1707702051444', |
| 'HstCmu4602665': '1707702051444', |
| 'HstPn4602665': '1', |
| 'HstPt4602665': '1', |
| 'HstCnv4602665': '1', |
| 'HstCns4602665': '1', |
| 'aywcUid': 'waMYJwndUl_20240212094110', |
| 'tet': '1707705671658', |
| 'tetm': 'E8F5E', |
| 'tcv': 'V4', |
| } |
| |
| headers = { |
| 'authority': 'heimaai.top', |
| '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', |
| 'cache-control': 'no-cache', |
| |
| |
| 'pragma': 'no-cache', |
| 'referer': 'https://heimaai.top/recaptcha/v4/challenge?url=https://heimaai.top&s=1', |
| 'sec-ch-ua': '"Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"', |
| 'sec-ch-ua-mobile': '?0', |
| 'sec-ch-ua-platform': '"Windows"', |
| 'sec-fetch-dest': 'document', |
| 'sec-fetch-mode': 'navigate', |
| 'sec-fetch-site': 'same-origin', |
| 'upgrade-insecure-requests': '1', |
| 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36', |
| } |
| |
| params = { |
| 'keyword': '美女', |
| } |
| |
| response = requests.get('https://heimaai.top/search', params=params, cookies=cookies, headers=headers) |
| |
| html=etree.HTML(response.text) |
| href=html.xpath('//li/a[@class="result-resource-title common-link"]/@href') |
| |
| |
| soup = BeautifulSoup(response.text, "html.parser") |
| |
| |
| title=[] |
| |
| for li_tag in soup.find_all("li"): |
| for a in li_tag.find_all('a',{'class':'result-resource-title common-link'}): |
| |
| title.append(a.text) |
| |
| |
| for item in list(zip(title,href)): |
| if item[1].startswith("https"): |
| print(item[0],item[1]) |
| else: |
| print(item[0],'https://heimaai.top'+item[1]) |
| |
| |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)