From 2e128befdac4ee892d82e09fc6c299ec6e8aad29 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 30 Sep 2013 21:18:27 +0200 Subject: set the useragent when getting the full body for the xpath enhancer --- articleenhancer/xpatharticleenhancer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'articleenhancer') diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php index 77a16f04d..93ceaf896 100644 --- a/articleenhancer/xpatharticleenhancer.php +++ b/articleenhancer/xpatharticleenhancer.php @@ -61,7 +61,7 @@ class XPathArticleEnhancer implements ArticleEnhancer { foreach($this->regexXPathPair as $regex => $search) { if(preg_match($regex, $item->getUrl())) { - $file = $this->fileFactory->getFile($item->getUrl(), $this->maximumTimeout); + $file = $this->fileFactory->getFile($item->getUrl(), $this->maximumTimeout, "Mozilla/5.0 AppleWebKit"); // convert encoding by detecting charset from header $contentType = $file->headers['content-type']; @@ -215,4 +215,4 @@ class XPathArticleEnhancer implements ArticleEnhancer { } -} \ No newline at end of file +} -- cgit v1.2.3