rapparent_encodinghref=contents12htmlhref=contents12htmlrule = href=contents12htmlroot = httpwwwgzcceducnurl_li=refindallrulertextfor url in url_li real_url = root + url printreal_url r = req
= '','' try: rule1 = r'wrap_content">(.?)' news_title = re.findall(rule1, r.text, re.S)[0].strip() time = re.findall('(发布时间:.?)', r.text)[0] except: pass print(news_title,time)
原文地址: https://www.cveoy.top/t/topic/hqcj 著作权归作者所有。请勿转载和采集!