Skip to content

Commit

Permalink
prints added
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewxcav committed Dec 31, 2024
1 parent 471a7aa commit 42e408a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handlers/twitter_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ def filesize_limiter(info_dict, *args, **kwargs):
url_hash = hash(url)
if url_hash in recent_video_cache.keys():
actual_filename = recent_video_cache[url_hash]
print(f"Cache hit: {actual_filename}")
else:
result = ydl.extract_info(url, download=True)
actual_filename = ydl.prepare_filename(f"{result}_{url_hash}")
recent_video_cache[url_hash] = actual_filename #move this after exceptions?
print(f"Cache miss filename: {actual_filename}")
except FilesizeLimitError as e:
print(f"Skipping download: {e}")
except Exception as e:
Expand Down

0 comments on commit 42e408a

Please sign in to comment.