posts - 9,  comments - 0,  views - 2819
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
import requests
from bs4 import BeautifulSoup
dict_s = {'Upgrade-Insecure-Requests':' 1','Referer':'https://www.696cf.com/htm/downlist6/',
'User - Agent':' Mozilla / 5.0(Windows NT 6.1;Win64;x64;rv: 60.0) Gecko / 20100101Firefox / 60.0',
'Accept':'text / html, application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
}

'''# 拿到 = requests.get(url,cookies={'__cfduid':'ded969018e77861273aee19f142c4c2201529330809',
'_ga':'GA1.2.282329388.1529330815',
'_gat_gtag_UA_108266294_3':'1',
'_gid':'GA1.2.664839187.1529330815',
'Hm_lpvt_767e27c6fc5a7b6a90ba665ed5f7559b':'1529338158',
'Hm_lvt_767e27c6fc5a7b6a90ba665ed5f7559b':'1529330811'})
'''

for i in range(899,900): #389,11319
url=("https://www.868cf.com/htm/down6/%s.htm" % str(i))

拿到 = requests.get(url)
拿到.encoding='utf-8'

soup = BeautifulSoup(拿到.text,'html.parser')
print(soup)
tag_name = soup.find('dd','film_title').text

tag_url=soup.find('a').find_all(id='downUL')
print(tag_name,tag_url)




# x=0
# y=[]
# tag_list = soup.find(id='wasu-pl-list').find_all(name='a')
#
# file = open('lj.txt', 'w', encoding='utf-8')
# for i in tag_list:
# h3 = i.find(name='h3')
# if not h3:
# continue
#
# summary = i.find('p').text
posted on   何方明月  阅读(533)  评论(0编辑  收藏  举报
编辑推荐:
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
阅读排行:
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 字符编码:从基础到乱码解决
· 提示词工程——AI应用必不可少的技术
点击右上角即可分享
微信分享提示