Skip to content

Instantly share code, notes, and snippets.

@rrunix
rrunix / cites.py
Last active April 6, 2018 10:01
Obtain the number of cites for a set of URLs which denote academic papers. The program expects the links to be in a file called "links.txt" where each link is in a line. (It is necessary to install requests)
import requests
import re
cites_pattern = re.compile('Cited\s*by\s*([0-9]*)')
with open("links.txt", "r") as fin:
for line in fin:
line = line.strip()
page = requests.get("https://scholar.google.es/scholar?", params={'hl':'en', 'q':line}).text