diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 12:57:21 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-04-09 12:57:33 +0200 |
commit | fcef0800a24818305e8a52761b05f87e13206689 (patch) | |
tree | 5940cd74a000890dfbb1e078570a22d21aada3c7 /articleenhancer | |
parent | 55b6a4fa7ba6fd905a24b01955d1ddafad0cc692 (diff) |
fix article enhancers by providing the correct useragent
Diffstat (limited to 'articleenhancer')
-rw-r--r-- | articleenhancer/xpatharticleenhancer.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/articleenhancer/xpatharticleenhancer.php b/articleenhancer/xpatharticleenhancer.php index 99aa61177..586f65151 100644 --- a/articleenhancer/xpatharticleenhancer.php +++ b/articleenhancer/xpatharticleenhancer.php @@ -57,7 +57,13 @@ class XPathArticleEnhancer implements ArticleEnhancer { foreach($this->regexXPathPair as $regex => $search) { if(preg_match($regex, $item->getUrl())) { - $file = $this->fileFactory->getFile($item->getUrl(), $this->maximumTimeout, "Mozilla/5.0 AppleWebKit"); + $file = $this->fileFactory->getFile( + $item->getUrl(), + $this->maximumTimeout, + 5, + null, + "Mozilla/5.0 AppleWebKit" + ); // convert encoding by detecting charset from header $contentType = $file->headers['content-type']; |