Skip to content

Commit

Permalink
fix: torrentio proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
g0ldyy committed Jul 24, 2024
1 parent 58f11fc commit b098bb1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions comet/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,13 @@ async def get_torrentio(log_name: str, type: str, full_id: str
):
results = []
try:
get_torrentio = requests.get(f"https://torrentio.strem.fun/stream/{type}/{full_id}.json", proxies={
"http": settings.DEBRID_PROXY_URL,
"https": settings.DEBRID_PROXY_URL,
}).json()
try:
get_torrentio = requests.get(f"https://torrentio.strem.fun/stream/{type}/{full_id}.json").json()
except:
get_torrentio = requests.get(f"https://torrentio.strem.fun/stream/{type}/{full_id}.json", proxies={
"http": settings.DEBRID_PROXY_URL,
"https": settings.DEBRID_PROXY_URL,
}).json()

for torrent in get_torrentio["streams"]:
title = torrent["title"]
Expand Down

0 comments on commit b098bb1

Please sign in to comment.