From: Antonio Ospite Date: Thu, 24 May 2018 21:43:16 +0000 (+0200) Subject: Tweeper.php: update the User-Agent string to fix parsing twitter.com X-Git-Tag: v1.3.0~7 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/d9aa66bef1f3724e1714d4ae6b45fca98e0dcd11?ds=sidebyside 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. --- 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}.