Fix copy/paste error, switch to info logging

This commit is contained in:
Tanner
2019-10-16 05:26:47 +00:00
parent 9f60ee7864
commit ca9bed855f
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -147,7 +147,7 @@ Then run `sudo certbot --nginx` and follow the prompts, enable redirect.
This program is free and open-source software licensed under the MIT License. Please see the `LICENSE` file for details. This program is free and open-source software licensed under the MIT License. Please see the `LICENSE` file for details.
That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose as long as you grant the same rights when distributing it. You deserve these rights. Please take advantage of them because I like pull requests and would love to see this code put to use. That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose. You deserve these rights. Please take advantage of them because I like pull requests and would love to see this code put to use.
## Acknowledgements ## Acknowledgements
+2 -2
View File
@@ -30,7 +30,7 @@ def get_article(url):
data = {'submitid': '9tjtS1EYe5wy8AJiYgVfH9P97uHU1IHG4lO67hsQpHOC3KKJrhqVIoQG2U7Rg%2Fpr', 'url': url} data = {'submitid': '9tjtS1EYe5wy8AJiYgVfH9P97uHU1IHG4lO67hsQpHOC3KKJrhqVIoQG2U7Rg%2Fpr', 'url': url}
r = requests.post(ARCHIVE_API, data=data, timeout=20, allow_redirects=False) r = requests.post(ARCHIVE_API, data=data, timeout=20, allow_redirects=False)
if r.status_code == 200: if r.status_code == 200:
logging.error('Submitted for archiving. Skipping to wait...') logging.info('Submitted for archiving. Skipping to wait...')
return '' return ''
elif 'location' in r.headers: elif 'location' in r.headers:
url = r.headers['location'] url = r.headers['location']
@@ -47,7 +47,7 @@ def get_article(url):
headers = {'Referer': 'https://outline.com/'} headers = {'Referer': 'https://outline.com/'}
r = requests.get(OUTLINE_API, params=params, headers=headers, timeout=20) r = requests.get(OUTLINE_API, params=params, headers=headers, timeout=20)
if r.status_code == 429: if r.status_code == 429:
logging.error('Rate limited by outline, sleeping 30s and skipping...') logging.info('Rate limited by outline, sleeping 30s and skipping...')
time.sleep(30) time.sleep(30)
return '' return ''
if r.status_code != 200: if r.status_code != 200: