我的正则表达式有什么问题吗,为什么没有报错也返回不了值
import csv
import re
import requests
url = "https://www.dytt8.net/index2.htm"
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.44"
}
response = requests.get(url, headers=headers) # 如果添加verify = False 就是去掉安全验证
response.encoding = 'gbk' # 指定字符集
page_content = response.text
# 解析页面
obj = re.compile(r"最新电影更新.*?(?P<link>.*?)
", re.S)
result = obj.finditer(page_content)
# f = open(f"paradise.csv", mode="w")
# csvwriter = csv.writer(f)
for i in result:
print(i.group("link"))
# dic = i.groupdict()
# csvwriter.writerow(dic.values())
# print("over!!!")