support both jap.aip.org and apl.aip.org

This commit is contained in:
Bryan Bishop 2013-02-09 08:03:29 -06:00
parent 143323b096
commit a8abdb2322

View File

@ -200,7 +200,7 @@ def download_url(url):
else: else:
content = new_content content = new_content
response = new_response response = new_response
elif "apl.aip.org" in url: elif ".aip.org/" in url:
try: try:
title = tree.xpath("//title/text()")[0].split(" | ")[0] title = tree.xpath("//title/text()")[0].split(" | ")[0]
pdf_url = [link for link in tree.xpath("//a/@href") if "getpdf" in link][0] pdf_url = [link for link in tree.xpath("//a/@href") if "getpdf" in link][0]