Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f7def38

Browse files
authoredJan 26, 2025
add UA
1 parent 0850b6e commit f7def38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎v3/timerbot31.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ def _caption(caption):
640640
return caption
641641

642642
try:
643-
req = requests.get(link).json()
643+
req = requests.get(link, headers={'User-Agent': 'Mozilla'}).json()
644644
except Exception as e:
645645
logger.error(f"[{datetime.datetime.now()}] API request failed: {str(e)}")
646646
return update.message.reply_text(f"Failed to fetch media")

0 commit comments

Comments
 (0)
Please sign in to comment.