twitter: fix misparsing of https://twitter.com/i/status/:id urls.
Fix URLs like `https://twitter.com/i/status/943446161586733056` parsing the username as `i`. This led to the new artist page recommending the tag name `i` when creating an artist for a source like this. Also fix these URLs not being normalized to `https://twitter.com/:username/status/:id` after upload.
This commit is contained in:
@@ -40,12 +40,13 @@ class Source::URL::Twitter < Source::URL
|
||||
in "twitter.com", "i", "web", "status", status_id
|
||||
@status_id = status_id
|
||||
|
||||
# https://twitter.com/i/status/943446161586733056
|
||||
# https://twitter.com/motty08111213/status/943446161586733056
|
||||
# https://twitter.com/motty08111213/status/943446161586733056?s=19
|
||||
# https://twitter.com/Kekeflipnote/status/1496555599718498319/video/1
|
||||
# https://twitter.com/sato_1_11/status/1496489742791475201/photo/2
|
||||
in "twitter.com", username, "status", status_id, *rest
|
||||
@username = username
|
||||
@username = username unless username.in?(RESERVED_USERNAMES)
|
||||
@status_id = status_id
|
||||
|
||||
# https://twitter.com/intent/user?user_id=1485229827984531457
|
||||
|
||||
Reference in New Issue
Block a user