Fix fetching details from Twitter
Due to 429 error. Details: e6dc2ca5f2
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
cb1e348665
commit
77945c8236
@ -308,11 +308,11 @@ defmodule Mobilizon.Service.RichMedia.Parser do
|
||||
|
||||
# Twitter requires a well-know crawler user-agent to show server-rendered data
|
||||
defp default_user_agent("https://twitter.com/" <> _) do
|
||||
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||
Config.instance_user_agent() <> " (compatible; bot)"
|
||||
end
|
||||
|
||||
defp default_user_agent("https://mobile.twitter.com/" <> _) do
|
||||
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||
Config.instance_user_agent() <> " (compatible; bot)"
|
||||
end
|
||||
|
||||
defp default_user_agent(_url) do
|
||||
|
Loading…
Reference in New Issue
Block a user