Fix bug with dailymail.co.uk

This commit is contained in:
Frederic Guillot 2015-07-02 21:03:00 -04:00
parent 154abcd57b
commit f745d70496
10 changed files with 1356 additions and 36 deletions

View File

@ -6,7 +6,7 @@
"fguillot/simple-validator": "v0.0.3",
"fguillot/json-rpc": "v0.0.3",
"fguillot/picodb": "v0.0.3",
"fguillot/picofeed": "v0.1.4",
"fguillot/picofeed": "v0.1.5",
"fguillot/picofarad": "dev-master"
},
"autoload": {

2
vendor/autoload.php vendored
View File

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

View File

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

View File

@ -156,17 +156,17 @@
},
{
"name": "fguillot/picofeed",
"version": "v0.1.4",
"version_normalized": "0.1.4.0",
"version": "v0.1.5",
"version_normalized": "0.1.5.0",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoFeed.git",
"reference": "efa4a3ff139d147ac294070d8b60005abefa19ad"
"reference": "40dfb81ff0d578d1c1fc800a389933da47aa3dd7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/efa4a3ff139d147ac294070d8b60005abefa19ad",
"reference": "efa4a3ff139d147ac294070d8b60005abefa19ad",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/40dfb81ff0d578d1c1fc800a389933da47aa3dd7",
"reference": "40dfb81ff0d578d1c1fc800a389933da47aa3dd7",
"shasum": ""
},
"require": {
@ -180,7 +180,7 @@
"suggest": {
"ext-curl": "PicoFeed will use cURL if present"
},
"time": "2015-06-21 13:45:50",
"time": "2015-07-03 00:57:06",
"bin": [
"picofeed"
],
@ -197,11 +197,10 @@
],
"authors": [
{
"name": "Frédéric Guillot",
"homepage": "http://fredericguillot.com"
"name": "Frédéric Guillot"
}
],
"description": "Modern library to write or read feeds (RSS/Atom)",
"homepage": "http://fguillot.github.io/picoFeed"
"description": "Modern library to handle RSS/Atom feeds",
"homepage": "https://github.com/fguillot/picoFeed"
}
]

View File

@ -38,7 +38,7 @@ Requirements
Authors
-------
- Original author: [Frédéric Guillot](http://fredericguillot.com/)
- Original author: Frédéric Guillot
- Major Contributors:
- [Bernhard Posselt](https://github.com/Raydiation)
- [David Pennington](https://github.com/Xeoncross)

View File

@ -1,13 +1,12 @@
{
"name": "fguillot/picofeed",
"description": "Modern library to write or read feeds (RSS/Atom)",
"homepage": "http://fguillot.github.io/picoFeed",
"description": "Modern library to handle RSS/Atom feeds",
"homepage": "https://github.com/fguillot/picoFeed",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Frédéric Guillot",
"homepage": "http://fredericguillot.com"
"name": "Frédéric Guillot"
}
],
"require": {

View File

@ -5,25 +5,13 @@ Versions
--------
- Development version: master
- Stable version: v0.1.4
- Stable version: use the last tag
Installation with Composer
--------------------------
Configure your `composer.json`:
```json
{
"require": {
"fguillot/picofeed": "0.1.4"
}
}
```
Or simply:
```bash
composer require fguillot/picofeed:0.1.4
composer require fguillot/picofeed @stable
```
And download the code:

View File

@ -239,6 +239,7 @@ class Rss20 extends Parser
);
foreach ($links as $link) {
$link = trim($link);
if (! empty($link) && filter_var($link, FILTER_VALIDATE_URL) !== false) {
$item->url = $link;
break;

View File

@ -152,6 +152,11 @@ class Rss20ParserTest extends PHPUnit_Framework_TestCase
$feed = $parser->execute();
$this->assertNotEmpty($feed->items);
$this->assertEquals('http://www.pcinpact.com/breve/78872-la-dcri-purge-wikipedia-par-menace-bel-effet-streisand-a-cle.htm?utm_source=PCi_RSS_Feed&utm_medium=news&utm_campaign=pcinpact', $feed->items[0]->getUrl());
$parser = new Rss20(file_get_contents('tests/fixtures/dailymail.co.uk.xml'));
$feed = $parser->execute();
$this->assertNotEmpty($feed->items);
$this->assertEquals('http://www.dailymail.co.uk/sport/sportsnews/article-3146732/Heartbreak-tears-England-Lionesses-crash-Women-s-World-Cup-defender-Laura-Bassett-scores-freak-goal-injury-time-Japan-final.html?ITO=1490&ns_mchannel=rss&ns_campaign=1490', $feed->items[0]->getUrl());
}
public function testItemTitle()

File diff suppressed because it is too large Load Diff