fix twitter scraper again

This commit is contained in:
byte[] 2020-09-28 17:47:45 -04:00
parent cb11ba082b
commit d1093a80b0

View file

@ -1,7 +1,7 @@
defmodule Philomena.Scrapers.Twitter do
@gt_regex ~r|document.cookie = decodeURIComponent\("gt=(\d+);|
@url_regex ~r|\Ahttps?://(?:mobile\.)?twitter.com/([A-Za-z\d_]+)/status/([\d]+)/?|
@script_regex ~r|<script type="text/javascript" .*? src="(https://abs.twimg.com/responsive-web/client-web-legacy/main\.[\da-z]+\.js)">|
@script_regex ~r|<script type="text/javascript" .*? src="(https://abs.twimg.com/responsive-web/client-web/main\.[\da-z]+\.js)">|
@bearer_regex ~r|"(AAAAAAAAAAAAA[^"]*)"|
@spec can_handle?(URI.t(), String.t()) :: true | false