api/reddit: add support for mobile links & bunch of other links (#1098)
* api/reddit: extract params from a mobile share link * api/reddit: add support for a bunch of links & update the api endpoint also fixed "undefined" in a filename when downloading a user post * api/service-patterns: fix reddit id pattern
This commit is contained in:
@@ -20,8 +20,10 @@ export const testers = {
|
||||
pattern.id?.length <= 128 || pattern.shortLink?.length <= 32,
|
||||
|
||||
"reddit": pattern =>
|
||||
(pattern.sub?.length <= 22 && pattern.id?.length <= 10)
|
||||
|| (pattern.user?.length <= 22 && pattern.id?.length <= 10),
|
||||
pattern.id?.length <= 16 && !pattern.sub && !pattern.user
|
||||
|| (pattern.sub?.length <= 22 && pattern.id?.length <= 16)
|
||||
|| (pattern.user?.length <= 22 && pattern.id?.length <= 16)
|
||||
|| (pattern.sub?.length <= 22 && pattern.shareId?.length <= 16),
|
||||
|
||||
"rutube": pattern =>
|
||||
(pattern.id?.length === 32 && pattern.key?.length <= 32) ||
|
||||
|
||||
Reference in New Issue
Block a user