diff --git a/vendor/PicoFeed/Grabber.php b/vendor/PicoFeed/Grabber.php index d2ce0c8..840d11d 100644 --- a/vendor/PicoFeed/Grabber.php +++ b/vendor/PicoFeed/Grabber.php @@ -261,9 +261,12 @@ class Grabber if (($pos = strpos($hostname, '.')) !== false) { $files[] = substr($hostname, $pos); + $files[] = substr($hostname, $pos + 1); $files[] = substr($hostname, 0, $pos); } + // Logging::setMessage(var_export($files, true)); + foreach ($files as $file) { $filename = __DIR__.'/Rules/'.$file.'.php'; @@ -285,6 +288,7 @@ class Grabber */ public function parseContentWithRules(array $rules) { + // Logging::setMessage($this->html); $dom = XmlParser::getHtmlDocument(''.$this->html); $xpath = new DOMXPath($dom); diff --git a/vendor/PicoFeed/Reader.php b/vendor/PicoFeed/Reader.php index acee7d0..0c65603 100644 --- a/vendor/PicoFeed/Reader.php +++ b/vendor/PicoFeed/Reader.php @@ -235,8 +235,8 @@ class Reader $xpath = new DOMXPath($dom); $queries = array( - "//link[@type='application/atom+xml']", - "//link[@type='application/rss+xml']" + '//link[@type="application/rss+xml"]', + '//link[@type="application/atom+xml"]', ); foreach ($queries as $query) { diff --git a/vendor/PicoFeed/Rules/.igen.fr.php b/vendor/PicoFeed/Rules/.igen.fr.php index b0a99ef..0e0436e 100644 --- a/vendor/PicoFeed/Rules/.igen.fr.php +++ b/vendor/PicoFeed/Rules/.igen.fr.php @@ -1,8 +1,8 @@ 'http://www.igen.fr/iphone/ios-7-cree-des-milliers-de-requetes-fantomes-sur-le-web-110130', + 'test_url' => 'http://www.igen.fr/ailleurs/2014/05/nvidia-va-delaisser-les-smartphones-grand-public-86031', 'body' => array( - '//*[starts-with(@id, "news")]/*[contains(@class, "content")]' + '//div[contains(@class, "field-name-body")]' ), 'strip' => array( ), diff --git a/vendor/PicoFeed/Rules/macg.co.php b/vendor/PicoFeed/Rules/macg.co.php new file mode 100644 index 0000000..ae54540 --- /dev/null +++ b/vendor/PicoFeed/Rules/macg.co.php @@ -0,0 +1,9 @@ + 'http://www.macg.co//logiciels/2014/05/feedly-sameliore-un-petit-peu-sur-mac-82205', + 'body' => array( + '//div[contains(@class, "field-name-body")]' + ), + 'strip' => array( + ), +); \ No newline at end of file