Fix bug with dailymail.co.uk
This commit is contained in:
parent
154abcd57b
commit
f745d70496
@ -6,7 +6,7 @@
|
|||||||
"fguillot/simple-validator": "v0.0.3",
|
"fguillot/simple-validator": "v0.0.3",
|
||||||
"fguillot/json-rpc": "v0.0.3",
|
"fguillot/json-rpc": "v0.0.3",
|
||||||
"fguillot/picodb": "v0.0.3",
|
"fguillot/picodb": "v0.0.3",
|
||||||
"fguillot/picofeed": "v0.1.4",
|
"fguillot/picofeed": "v0.1.5",
|
||||||
"fguillot/picofarad": "dev-master"
|
"fguillot/picofarad": "dev-master"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit3973a10bce966c867b4a041e7bc913b0::getLoader();
|
return ComposerAutoloaderInit0c3a5cd890e1e4c1b0fe3e391a8e6c52::getLoader();
|
||||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit3973a10bce966c867b4a041e7bc913b0
|
class ComposerAutoloaderInit0c3a5cd890e1e4c1b0fe3e391a8e6c52
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@ -19,9 +19,9 @@ class ComposerAutoloaderInit3973a10bce966c867b4a041e7bc913b0
|
|||||||
return self::$loader;
|
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();
|
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';
|
$map = require __DIR__ . '/autoload_namespaces.php';
|
||||||
foreach ($map as $namespace => $path) {
|
foreach ($map as $namespace => $path) {
|
||||||
@ -42,14 +42,14 @@ class ComposerAutoloaderInit3973a10bce966c867b4a041e7bc913b0
|
|||||||
|
|
||||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||||
foreach ($includeFiles as $file) {
|
foreach ($includeFiles as $file) {
|
||||||
composerRequire3973a10bce966c867b4a041e7bc913b0($file);
|
composerRequire0c3a5cd890e1e4c1b0fe3e391a8e6c52($file);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $loader;
|
return $loader;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function composerRequire3973a10bce966c867b4a041e7bc913b0($file)
|
function composerRequire0c3a5cd890e1e4c1b0fe3e391a8e6c52($file)
|
||||||
{
|
{
|
||||||
require $file;
|
require $file;
|
||||||
}
|
}
|
||||||
|
19
vendor/composer/installed.json
vendored
19
vendor/composer/installed.json
vendored
@ -156,17 +156,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fguillot/picofeed",
|
"name": "fguillot/picofeed",
|
||||||
"version": "v0.1.4",
|
"version": "v0.1.5",
|
||||||
"version_normalized": "0.1.4.0",
|
"version_normalized": "0.1.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/fguillot/picoFeed.git",
|
"url": "https://github.com/fguillot/picoFeed.git",
|
||||||
"reference": "efa4a3ff139d147ac294070d8b60005abefa19ad"
|
"reference": "40dfb81ff0d578d1c1fc800a389933da47aa3dd7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/efa4a3ff139d147ac294070d8b60005abefa19ad",
|
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/40dfb81ff0d578d1c1fc800a389933da47aa3dd7",
|
||||||
"reference": "efa4a3ff139d147ac294070d8b60005abefa19ad",
|
"reference": "40dfb81ff0d578d1c1fc800a389933da47aa3dd7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -180,7 +180,7 @@
|
|||||||
"suggest": {
|
"suggest": {
|
||||||
"ext-curl": "PicoFeed will use cURL if present"
|
"ext-curl": "PicoFeed will use cURL if present"
|
||||||
},
|
},
|
||||||
"time": "2015-06-21 13:45:50",
|
"time": "2015-07-03 00:57:06",
|
||||||
"bin": [
|
"bin": [
|
||||||
"picofeed"
|
"picofeed"
|
||||||
],
|
],
|
||||||
@ -197,11 +197,10 @@
|
|||||||
],
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Frédéric Guillot",
|
"name": "Frédéric Guillot"
|
||||||
"homepage": "http://fredericguillot.com"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Modern library to write or read feeds (RSS/Atom)",
|
"description": "Modern library to handle RSS/Atom feeds",
|
||||||
"homepage": "http://fguillot.github.io/picoFeed"
|
"homepage": "https://github.com/fguillot/picoFeed"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
2
vendor/fguillot/picofeed/README.markdown
vendored
2
vendor/fguillot/picofeed/README.markdown
vendored
@ -38,7 +38,7 @@ Requirements
|
|||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
|
||||||
- Original author: [Frédéric Guillot](http://fredericguillot.com/)
|
- Original author: Frédéric Guillot
|
||||||
- Major Contributors:
|
- Major Contributors:
|
||||||
- [Bernhard Posselt](https://github.com/Raydiation)
|
- [Bernhard Posselt](https://github.com/Raydiation)
|
||||||
- [David Pennington](https://github.com/Xeoncross)
|
- [David Pennington](https://github.com/Xeoncross)
|
||||||
|
7
vendor/fguillot/picofeed/composer.json
vendored
7
vendor/fguillot/picofeed/composer.json
vendored
@ -1,13 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "fguillot/picofeed",
|
"name": "fguillot/picofeed",
|
||||||
"description": "Modern library to write or read feeds (RSS/Atom)",
|
"description": "Modern library to handle RSS/Atom feeds",
|
||||||
"homepage": "http://fguillot.github.io/picoFeed",
|
"homepage": "https://github.com/fguillot/picoFeed",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Frédéric Guillot",
|
"name": "Frédéric Guillot"
|
||||||
"homepage": "http://fredericguillot.com"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5,25 +5,13 @@ Versions
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
- Development version: master
|
- Development version: master
|
||||||
- Stable version: v0.1.4
|
- Stable version: use the last tag
|
||||||
|
|
||||||
Installation with Composer
|
Installation with Composer
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
Configure your `composer.json`:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"require": {
|
|
||||||
"fguillot/picofeed": "0.1.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Or simply:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
composer require fguillot/picofeed:0.1.4
|
composer require fguillot/picofeed @stable
|
||||||
```
|
```
|
||||||
|
|
||||||
And download the code:
|
And download the code:
|
||||||
|
@ -239,6 +239,7 @@ class Rss20 extends Parser
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($links as $link) {
|
foreach ($links as $link) {
|
||||||
|
$link = trim($link);
|
||||||
if (! empty($link) && filter_var($link, FILTER_VALIDATE_URL) !== false) {
|
if (! empty($link) && filter_var($link, FILTER_VALIDATE_URL) !== false) {
|
||||||
$item->url = $link;
|
$item->url = $link;
|
||||||
break;
|
break;
|
||||||
|
@ -152,6 +152,11 @@ class Rss20ParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$feed = $parser->execute();
|
$feed = $parser->execute();
|
||||||
$this->assertNotEmpty($feed->items);
|
$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());
|
$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()
|
public function testItemTitle()
|
||||||
|
1328
vendor/fguillot/picofeed/tests/fixtures/dailymail.co.uk.xml
vendored
Normal file
1328
vendor/fguillot/picofeed/tests/fixtures/dailymail.co.uk.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user