不知道ex哪裡寫錯了,輸出都是空值
源代碼:
import re
import requests
if name=='main':
url='https://ys.mihoyo.com/main/character/liyue?char=0%27
headers = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36'}
page_text=requests.get(url=url,headers=headers).text
ex='<li class="swiper-slide swiper-slide-thumb-active swiper-slide-visible swiper-slide-active">< img src="(.*?)" draggable.*?