Skip to content

Commit

Permalink
Add support for m dot urls
Browse files Browse the repository at this point in the history
  • Loading branch information
localnerve authored and ihabunek committed Apr 25, 2024
1 parent 0f17d92 commit c00a9c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2.2.4:
date: 2024-04-24
changes:
- "Add m dot url support to video and clip regexes"

2.2.3:
date: 2024-04-24
changes:
Expand Down
6 changes: 3 additions & 3 deletions twitchdl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ def titlify(value: str) -> str:

VIDEO_PATTERNS = [
r"^(?P<id>\d+)?$",
r"^https://(www.)?twitch.tv/videos/(?P<id>\d+)(\?.+)?$",
r"^https://(www\.|m\.)?twitch\.tv/videos/(?P<id>\d+)(\?.+)?$",
]

CLIP_PATTERNS = [
r"^(?P<slug>[A-Za-z0-9]+(?:-[A-Za-z0-9_-]{16})?)$",
r"^https://(www.)?twitch.tv/\w+/clip/(?P<slug>[A-Za-z0-9]+(?:-[A-Za-z0-9_-]{16})?)(\?.+)?$",
r"^https://clips.twitch.tv/(?P<slug>[A-Za-z0-9]+(?:-[A-Za-z0-9_-]{16})?)(\?.+)?$",
r"^https://(www\.|m\.)?twitch\.tv/\w+/clip/(?P<slug>[A-Za-z0-9]+(?:-[A-Za-z0-9_-]{16})?)(\?.+)?$",
r"^https://clips\.twitch\.tv/(?P<slug>[A-Za-z0-9]+(?:-[A-Za-z0-9_-]{16})?)(\?.+)?$",
]


Expand Down

0 comments on commit c00a9c3

Please sign in to comment.