YourChinaScienceInvestigation/scripts/open_list.py

12 lines
321 B
Python

import sys
import re
import time
import webbrowser
file = sys.argv[1]
with open(file) as f:
for line in f:
u = re.sub(r'#.*', '', line).rstrip()
webbrowser.open(f"https://www.lens.org/lens/search/scholar/list?q=author.affiliation.name.keyword:\"{u}\"", new=2, autoraise=False)
time.sleep(10)