mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
enable requests-cache
This commit is contained in:
parent
853beb019f
commit
99fa53ecde
2 changed files with 10 additions and 0 deletions
|
@ -3,6 +3,15 @@ from concurrent.futures import ProcessPoolExecutor
|
|||
from datetime import datetime
|
||||
from modules.logs import MyLogger
|
||||
|
||||
from requests_cache import install_cache
|
||||
from datetime import datetime, timedelta
|
||||
install_cache(
|
||||
'config/http_cache',
|
||||
expire_after=timedelta(days=1), # Otherwise expire responses after one day
|
||||
allowable_methods=['GET', 'POST'], # Cache POST requests to avoid sending the same data twice
|
||||
allowable_codes=[200],
|
||||
match_headers=True,
|
||||
)
|
||||
try:
|
||||
import plexapi, requests, schedule
|
||||
from PIL import ImageFile
|
||||
|
|
|
@ -3,6 +3,7 @@ tmdbapis==1.0.6
|
|||
arrapi==1.3.1
|
||||
lxml==4.9.1
|
||||
requests==2.28.1
|
||||
requests-cache==0.9.6
|
||||
ruamel.yaml==0.17.21
|
||||
schedule==1.1.0
|
||||
retrying==1.3.3
|
||||
|
|
Loading…
Reference in a new issue