-
-
Notifications
You must be signed in to change notification settings - Fork 593
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When you share youtube-video from mobile app to telegram, it has name in the beginning like:
Respect💯 Greatest Save🦸♂️ #shorts #short #status #humanity #viral
https://youtube.com/shorts/1K1pMdQzV1M?si=uze3jaacXuKeWDNG
But ytdlbot searches for link in message begininng:
Line 593 in dd3e42f
| if not re.findall(r"^https?://", url.lower()): |
This doesn't let me to share the video from youtube app to a friend using the bot in a simple way.
Proposal
Let's parse links using (probably not) rfc-compliant pattern like:
/https?:\/\/[^\s\/]+(\/\S*)?/g
In search of the perfect URL validation regex
Maybe we should validate host in the link not to be local-addresses like localhost, 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and so on.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request