From 9c7da548e15a990582c635aa3f9a1563bc74fe2b Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Wed, 16 Jan 2013 02:56:06 -0600 Subject: [PATCH] fix xpath syntax --- modules/papers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/papers.py b/modules/papers.py index f3c62c4..4f6d194 100644 --- a/modules/papers.py +++ b/modules/papers.py @@ -169,7 +169,7 @@ def download_url(url): else: if "h1 class=\"articleTitle" in content: try: - title = tree.xpath("//h1[class='articleTitle']")[0].text + title = tree.xpath("//h1[@class='articleTitle']")[0].text title = title.encode("ascii", "ignore") pdf_url = tree.xpath("//a[@title='View the Full Text PDF']/@href")[0] except: