scrapers/twitter: support x.com (#211)

This commit is contained in:
mdashlw 2024-03-23 18:56:17 +03:00 committed by GitHub
parent 3395cd1470
commit 2dae9118c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
defmodule Philomena.Scrapers.Twitter do
@url_regex ~r|\Ahttps?://(?:mobile\.)?twitter.com/([A-Za-z\d_]+)/status/([\d]+)/?|
@url_regex ~r|\Ahttps?://(?:mobile\.)?(?:twitter\|x).com/([A-Za-z\d_]+)/status/([\d]+)/?|
@spec can_handle?(URI.t(), String.t()) :: true | false
def can_handle?(_uri, url) do