Skip to content

Commit

Permalink
print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
eddotman committed Jan 10, 2015
1 parent faa71c8 commit 7721525
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions articledownloader/articledownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_piis_dois_from_search(self, query, mode):
sleep(1000) #API request limit exceeeded; wait and try again
return -1
except KeyError:
print 'Failed search query!'
print 'Failed search query: ' + query
return -1


Expand Down Expand Up @@ -101,7 +101,6 @@ def get_pdf_from_pii(self, pii, directory):
with open(self.article_path, 'wb') as f:
for chunk in r.iter_content(2048):
f.write(chunk)
print 'Downloaded file successfully!'
except requests.exceptions.ConnectionError:
print '***API download limit exceeded!***'
print 'Waiting 1000 seconds before trying again'
Expand Down Expand Up @@ -146,7 +145,6 @@ def scrape_article(self, mode, directory, pii=None, doi=None, regex=True):
with open(self.article_path, 'wb') as f:
for chunk in r.iter_content(2048):
f.write(chunk)
print 'Downloaded file successfully!'

def save_xml_data(self, xml, path):
print 'Saved XML to: ' + path
Expand Down
Binary file added dist/articledownloader-1.4.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setup(
name = 'articledownloader',
packages = ['articledownloader'], # this must be the same as the name above
version = '1.3',
version = '1.4',
description = 'A class for downloading scientific journal articles',
author = 'Edward Kim',
author_email = '[email protected]',
Expand Down

0 comments on commit 7721525

Please sign in to comment.