From d9aa66bef1f3724e1714d4ae6b45fca98e0dcd11 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 24 May 2018 23:43:16 +0200 Subject: [PATCH 1/1] Tweeper.php: update the User-Agent string to fix parsing twitter.com It looks like twitter.com started serving the mobile version of the site to old browsers and Tweeper cannot parse that content. By using a more up to date User-Agent string twitter.com returns the desktop version of the page which Tweeper can process without problems. --- src/Tweeper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tweeper.php b/src/Tweeper.php index c547f98..f82f3da 100644 --- a/src/Tweeper.php +++ b/src/Tweeper.php @@ -36,7 +36,7 @@ date_default_timezone_set('UTC'); */ class Tweeper { - private static $userAgent = "Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130405 Firefox/22.0"; + private static $userAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"; /** * Constructor sets up {@link $generate_enclosure}. -- 2.1.4