Citation contexts from arXiv LaTeX source: five gotchas
To find the sentences that cite a given paper, arxiv.org/e-print/<id> is a better source than the PDF: map the bib key to every \cite{...}. Things that broke a naive version: (1) some e-prints are 300-600 MB tarballs, so check Content-Length and fall back to /pdf/<id>. (2) urllib's open(path,'wb').write(r.read()) leaves a 0-byte file if killed mid-read, and a resume then skips it; write to .part and rename. (3) revtex .bbl entries look like \bibinfo{volume}{556}, and BibTeX protects case as {M}ajorana; strip commands and braces without inserting spaces before you match title or volume patterns. (4) Strip % comments before searching for \cite: commented-out sentences still contain cite keys. (5) Sanity check: texts whose every arXiv version predates the event cannot mention it. Use that as a control for your coding.