Skip to content

Commit

Permalink
adds a basic try except block to catch LUP feed error
Browse files Browse the repository at this point in the history
  • Loading branch information
ironicbadger committed May 15, 2024
1 parent 80e728c commit 59e75fb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ $RECYCLE.BIN/

env/
output/
venv/

# This will fail in 2100, but i'm ok with that
#docs/**/20*/
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ mkdocs-material==7.2.8
mkdocs-material-extensions==1.0.1
pymdown-extensions==8.2
html2text==2020.1.16
pyyaml==5.4.1
pyyaml==6.0.1
python-dateutil==2.8.2
10 changes: 7 additions & 3 deletions scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ def main():

mkdir_safe(output_dir)

api_data = requests.get(show_config['fireside_url'] + "/json").json()
for api_episode in api_data["items"]:
futures.append(executor.submit(create_episode, api_episode, show_config, output_dir))
try:
api_data = requests.get(show_config['fireside_url'] + "/json").json()
for api_episode in api_data["items"]:
futures.append(executor.submit(create_episode, api_episode, show_config, output_dir))
except:
print("ERROR: An error occurred somewhere.")


# Drain to get exceptions. Still have to mash CTRL-C, though.
for future in concurrent.futures.as_completed(futures):
Expand Down

0 comments on commit 59e75fb

Please sign in to comment.