Update PicoFeed

This commit is contained in:
Frederic Guillot 2016-01-11 20:03:13 -05:00
parent 3f972dafc2
commit 06fdd3d765
26 changed files with 252 additions and 88 deletions

View File

@ -14,7 +14,7 @@
"fguillot/simple-validator": "v1.0.0",
"fguillot/json-rpc": "v1.0.2",
"fguillot/picodb": "v1.0.2",
"fguillot/picofeed": "v0.1.16"
"fguillot/picofeed": "v0.1.17"
},
"require-dev": {
"phpunit/phpunit": "4.8.3",
@ -40,7 +40,8 @@
"models/auto_update.php",
"models/database.php",
"models/remember_me.php",
"models/group.php"
"models/group.php",
"models/favicon.php"
],
"classmap": [
"vendor/fguillot/json-rpc/src/",

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInitb324395d2df28954aca677ed0d0d2268::getLoader();
return ComposerAutoloaderInit00bf4499632e34ac01e60c409b852c25::getLoader();

21
vendor/composer/LICENSE vendored Normal file
View File

@ -0,0 +1,21 @@
Copyright (c) 2015 Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitb324395d2df28954aca677ed0d0d2268
class ComposerAutoloaderInit00bf4499632e34ac01e60c409b852c25
{
private static $loader;
@ -19,9 +19,9 @@ class ComposerAutoloaderInitb324395d2df28954aca677ed0d0d2268
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitb324395d2df28954aca677ed0d0d2268', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit00bf4499632e34ac01e60c409b852c25', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitb324395d2df28954aca677ed0d0d2268', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit00bf4499632e34ac01e60c409b852c25', 'loadClassLoader'));
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -42,14 +42,14 @@ class ComposerAutoloaderInitb324395d2df28954aca677ed0d0d2268
$includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) {
composerRequireb324395d2df28954aca677ed0d0d2268($file);
composerRequire00bf4499632e34ac01e60c409b852c25($file);
}
return $loader;
}
}
function composerRequireb324395d2df28954aca677ed0d0d2268($file)
function composerRequire00bf4499632e34ac01e60c409b852c25($file)
{
require $file;
}

View File

@ -163,17 +163,17 @@
},
{
"name": "fguillot/picofeed",
"version": "v0.1.16",
"version_normalized": "0.1.16.0",
"version": "v0.1.17",
"version_normalized": "0.1.17.0",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoFeed.git",
"reference": "4162314ea083f0957079d6b1a63b2c24b1f6de73"
"reference": "6249abdd8a7070388d5257d93552b33424018a76"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/4162314ea083f0957079d6b1a63b2c24b1f6de73",
"reference": "4162314ea083f0957079d6b1a63b2c24b1f6de73",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/6249abdd8a7070388d5257d93552b33424018a76",
"reference": "6249abdd8a7070388d5257d93552b33424018a76",
"shasum": ""
},
"require": {
@ -188,7 +188,7 @@
"suggest": {
"ext-curl": "PicoFeed will use cURL if present"
},
"time": "2015-12-15 17:01:33",
"time": "2016-01-11 17:22:24",
"bin": [
"picofeed"
],

View File

@ -30,6 +30,7 @@ class Favicon
'image/x-icon',
'image/jpeg',
'image/jpg',
'image/svg+xml'
);
/**
@ -195,7 +196,7 @@ class Favicon
$dom = XmlParser::getHtmlDocument($html);
$xpath = new DOMXpath($dom);
$elements = $xpath->query("//link[contains(@rel, 'icon') and not(contains(@rel, 'apple'))]");
$elements = $xpath->query('//link[@rel="icon" or @rel="shortcut icon" or @rel="icon shortcut"]');
for ($i = 0; $i < $elements->length; ++$i) {
$icons[] = $elements->item($i)->getAttribute('href');

View File

@ -5,11 +5,16 @@ return array(
'%.*%' => array(
'test_url' => 'http://arstechnica.com/tech-policy/2015/09/judge-warners-2m-happy-birthday-copyright-is-bogus/',
'body' => array(
'//header/h2',
'//section[@id="article-guts"]',
'//div[@class="superscroll-content show"]',
'//div[@class="gallery"]',
),
'next_page' => '//span[@class="numbers"]/a',
'strip' => array(
'//figcaption',
'//div[@class="post-meta"]',
'//div[@class="gallery-image-credit"]',
'//aside',
'//div[@class="article-expander"]',
),

View File

@ -5,14 +5,13 @@ return array(
'%.*%' => array(
'test_url' => 'http://www.buenosairesherald.com/article/199344/manzur-named-next-governor-of-tucum%C3%A1n',
'body' => array(
'//div[@class="img_despliege"]',
'//div[@id="nota_despliegue"]',
'//div[@style="float:none"]',
),
'strip' => array(
'//script',
'//span[@id="fecha"]',
'//h1',
'//div[@class="autor"]',
'//div[contains(@class, "bz_alias_short_desc_container"]',
'//td[@id="bz_show_bug_column_1"]',
'//table[@id="attachment_table"]',
'//table[@class="bz_comment_table"]',
),
),
),

View File

@ -0,0 +1,15 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://dailyreporter.com/2016/01/09/us-supreme-court-case-could-weaken-government-workers-unions/',
'body' => array(
'//div[contains(@class, "entry-content")]',
),
'strip' => array(
'//*[contains(@class, "sharedaddy")]',
),
),
),
);

View File

@ -0,0 +1,22 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://foreignpolicy.com/2016/01/09/networking-giant-pulls-nsa-linked-code-exploited-by-hackers/',
'body' => array(
'//article',
),
'strip' => array(
'//div[@id="post-category"]',
'//div[@id="desktop-right"]',
'//h1',
'//section[@class="article-meta"]',
'//div[@class="side-panel-wrapper"]',
'//*[contains(@class, "share-")]',
'//*[contains(@id, "taboola-")]',
'//div[@class="comments"]',
),
),
),
);

View File

@ -5,23 +5,19 @@ return array(
'%.*%' => array(
'test_url' => 'http://www.jsonline.com/news/usandworld/as-many-as-a-million-expected-for-popes-last-mass-in-us-b99585180z1-329688131.html',
'body' => array(
'//div[@id="article"]',
'//div[@id="mainContent"]',
),
'strip' => array(
'//div[@class="storyTimestamp"]',
'//img[@class="floatLeft"]',
'//div[@class="overlineUpper"]',
'//div[@class="updated"]',
'//div[@class="columnist_link"]',
'//div[@class="side_container_01"]',
'//div[@class="credit"]',
'//script',
'//h1',
'//h2',
'//h4',
'//ul',
'//div[contains(@class, "footer-pkg")]',
'//img[contains(@src,"analytics")]',
'//h4[@class="credit"]',
'//div[@class="columnist_container"]',
'//div[@class="storyTimestamp"]',
'//ul[@id="sharing-tools"]',
'//div[@class="title"]',
'//img[@class="floatLeft"]',
'//div[@class="first feature"]',
'//div[@class="collateral_article_content"]',
),
),
),

View File

@ -0,0 +1,10 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.koreatimes.co.kr/www/news/nation/2015/12/116_192409.html',
'body' => '//div[@class="view_page_news_article_wrapper"]',
),
),
);

View File

@ -4,9 +4,7 @@ return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.linux.org/threads/lua-the-scripting-interpreter.8352/',
'body' => array(
'//div[@class="messageContent"]',
),
'body' => '//div[@class="messageContent"]',
'strip' => array(
'//aside',
),

View File

@ -4,12 +4,13 @@ return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.linuxinsider.com/story/82526.html?rss=1',
'body' => array(
'//div[@id="story-graphic-xlarge"]',
'//div[@id="story-body"]',
),
'body' => '//div[@id="story"]',
'strip' => array(
'//script',
'//h1]',
'//div[@id="story-toolbox1"]',
'//div[@id="story-byline"]',
'//div[@id="story"]/p',
'//div[@class="story-advertisement"]',
'//iframe',
),

View File

@ -0,0 +1,15 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://milwaukeenns.org/2016/01/08/united-way-grant-enables-sdc-to-restore-free-tax-assistance-program/',
'body' => array(
'//div[@class="pf-content"]',
),
'strip' => array(
'//div[@class="printfriendly"]',
),
),
),
);

View File

@ -0,0 +1,19 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://m.brewers.mlb.com/news/article/161364798',
'body' => array(
'//article',
),
'strip' => array(
'//div[@class="article-top"]',
'//div[contains(@class, "contributor-bottom")]',
'//p[@class="tagline"]',
'//div[contains(@class, "social-")]',
'//div[@class="button-wrap"]',
),
),
),
);

View File

@ -3,14 +3,15 @@
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.networkworld.com/article/2986764/smartphones/samsung-tried-to-troll-apple-fans-waiting-in-line-for-the-iphone-6s.html#tk.rss_all',
'test_url' => 'http://www.networkworld.com/article/3020585/security/the-incident-response-fab-five.html',
'body' => array(
'//figure/img[@class="hero-img"]',
'//section[@class="deck"]',
'//div[@itemprop="articleBody"] || //div[@itemprop="reviewBody"]',
'//div[@itemprop="articleBody"] | //div[@itemprop="reviewBody"]',
'//div[@class="carousel-inside-crop"]',
),
'strip' => array(
'//script',
'//aside',
'//div[@class="credit"]',
'//div[@class="view-large"]',

View File

@ -0,0 +1,22 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://onmilwaukee.com/movies/articles/downerspelunking.html',
'body' => '//article[@class="show"]',
'strip' => array(
'//h1',
'//div[contains(@class, "-ad")]',
'//div[contains(@class, "_ad")]',
'//div[@id="pub_wrapper"]',
'//div[@class="share_tools"]',
'//div[@class="clearfix"]',
'//div[contains(@class,"image_control")]',
'//section[@class="ribboned"]',
'//div[contains(@class,"sidebar")]',
'//aside[@class="article_tag_list"]',
),
),
),
);

View File

@ -4,9 +4,7 @@ return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.securityfocus.com/news/11569?ref=rss',
'body' => array(
'//div[@class="expanded"]',
),
'body' => '//div[@class="expanded"]',
),
),
);

View File

@ -4,9 +4,7 @@ return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.soundandvision.com/content/james-guthrie-mixing-roger-waters-and-pink-floyd-51',
'body' => array(
'//div[@id="left"]',
),
'body' => '//div[@id="left"]',
'strip' => array(
'//div[@class="meta"]',
'//div[@class="ratingsbox"]',

View File

@ -14,8 +14,8 @@ return array(
'//p[@class="small"]',
'//p[@style="font-weight: bold; font-size: 14px;"]',
'//div[@class="author"]',
'//div[@class="ad_container"]',
)
)
)
);

View File

@ -0,0 +1,28 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://international.thenewslens.com/post/255032/',
'body' => array(
'//article/main[contains(@class, "content-post")]',
),
'strip' => array(
'//div[@class="photo-credit"]',
'//p[@align="center"]',
'//div[@class="clearfix"]',
'//div[@class="authorZone"]',
'//style',
'//div[@id="ttsbox"]',
'//div[@id="ttscontrols"]',
'//div[@class="author-info"]',
'//div[contains(@id, "-ad")]',
'//div[@style="font-size:small;margin:3px 0 0 0;vertical-align:top;line-height:24px;"]',
'//div[contains(@class, "hidden-xs")]',
'//div[contains(@class, "visible-xs")]',
'//div[contains(@class, "visible-lg")]',
'//a[@name="comment-panel"]',
),
),
),
);

View File

@ -4,14 +4,12 @@ return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.thestandard.com.hk/breaking_news_detail.asp?id=67156',
'body' => array(
'//span[@class="bodyCopy"]',
),
'body' => '//div[contains(@class,"storyBody")]',
'strip' => array(
'//script',
'//br',
'//map[@name="gif_bar"]',
'//img[@usemap=""gif_bar"]',
'//img[contains(@usemap,"gif_bar")]',
'//a',
'//span[@class="bodyHeadline"]',
'//i',

View File

@ -14,6 +14,7 @@ return array(
'//*[@class="warning"]',
'//span[@class="off-screen"]',
'//span[@class="story-image-copyright"]',
'//ul[@class="story-body__unordered-list"]',
'//div[@class="ad_wrapper"]',
'//div[@id="article-sidebar"]',
'//div[@class="data-table-outer"]',

View File

@ -0,0 +1,14 @@
<?php
return array(
'grabber' => array(
'%.*%' => array(
'test_url' => 'http://www.franceculture.fr/emission-culture-eco-la-finance-aime-toujours-la-france-2016-01-08',
'body' => array(
'//div[@class="listen"]',
'//div[@class="field-items"]',
),
'strip' => array(
),
)
)
);

View File

@ -17,6 +17,7 @@ return array(
'//div[contains(@class,"loader")]',
'//p[@class="photoDetails"]',
'//div[@class="thumbnailSlider"]',
'//div[@class="shortcodeGalleryWrapper"]',
),
),
),