The running results are as follows , And then I used jupyter
C:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py:979: InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.dytt89.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
warnings.warn(
[]
import requestsimport reimport csvhomepage = "https://www.dytt89.com/"url1 = requests.get(homepage,verify=False)url1.encoding='gbk'obj1= re.compile("2022 Must see hot film .*?<li><a href='(?P<url2>.*?).*?</ul>",re.S)obj2= re.compile("href='/(?P<url22>.*?)' title=",re.S)obj3= re.compile("◎ slice name (?P<name>.*?)<br />,re.S")res1 = obj1.finditer(url1.text)res2 = obj2.finditer(str(res1))final = []for i in res2: url2 = requests.get(homepage + i,verify=False) url2.encoding='gbk' final.append(obj3.search(url2))print(final)
Be violent :
import urllib3
urllib3.disable_warnings()