Fix copy/paste error, switch to info logging
This commit is contained in:
parent
f293f2b5f9
commit
e4f81472fc
|
@ -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.
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ def get_article(url):
|
|||
data = {'submitid': '9tjtS1EYe5wy8AJiYgVfH9P97uHU1IHG4lO67hsQpHOC3KKJrhqVIoQG2U7Rg%2Fpr', 'url': url}
|
||||
r = requests.post(ARCHIVE_API, data=data, timeout=20, allow_redirects=False)
|
||||
if r.status_code == 200:
|
||||
logging.error('Submitted for archiving. Skipping to wait...')
|
||||
logging.info('Submitted for archiving. Skipping to wait...')
|
||||
return ''
|
||||
elif 'location' in r.headers:
|
||||
url = r.headers['location']
|
||||
|
@ -47,7 +47,7 @@ def get_article(url):
|
|||
headers = {'Referer': 'https://outline.com/'}
|
||||
r = requests.get(OUTLINE_API, params=params, headers=headers, timeout=20)
|
||||
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)
|
||||
return ''
|
||||
if r.status_code != 200:
|
||||
|
|
Loading…
Reference in New Issue
Block a user