Skip to content

Commit

Permalink
fix: add exception handling for threads
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Dec 17, 2023
1 parent fecb980 commit 3ea0b2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ python-dotenv==1.0.0
requests==2.31.0
svgwrite==1.4.3
tqdm==4.66.1
unhandled_exit==1.0.0
4 changes: 4 additions & 0 deletions update.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
from requests.adapters import HTTPAdapter
import svgwrite
from tqdm import tqdm
import unhandled_exit

# setup environment if running locally
load_dotenv()

# setup threading exception handling
unhandled_exit.activate()

# setup requests session
s = cloudscraper.CloudScraper() # CloudScraper inherits from requests.Session
retry_adapter = HTTPAdapter(max_retries=5)
Expand Down

0 comments on commit 3ea0b2d

Please sign in to comment.