This commit is contained in:
2022-10-27 16:57:22 +08:00
parent 6325f03ed9
commit 49e3efd12c
5 changed files with 11 additions and 11 deletions

View File

@@ -31,12 +31,12 @@ for loop in range(1):
href = 'https://journals.aps.org'+ href
if href not in match_href and re.search('\?', href)==None: # 链接不重复
match_href.append(href)
f.write('<p><a target=\"_blank\" href=\"')
f.write('<li><a target=\"_blank\" href=\"')
f.write(href) # 文章链接
f.write('\">')
f.write(a_tag.get_text())
f.write('</a>&nbsp;&nbsp;')
info = article.find('h6', {"class": "pub-info"}).get_text()
f.write(re.findall(' Published.*', info, re.S)[0][12:]+'</p>')
f.write(re.findall(' Published.*', info, re.S)[0][12:]+'</li>')
f.close()