From 45323c2b2f99986628d3a69e8a32316b1330a8c1 Mon Sep 17 00:00:00 2001 From: Thomas Dalichow <2012-02-05.github.com@thomasdalichow.de> Date: Fri, 1 Dec 2017 17:28:57 +0100 Subject: [PATCH 01/14] Fake user agent as Mixcloud blocks certain User-Agents --- bridges/MixCloudBridge.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bridges/MixCloudBridge.php b/bridges/MixCloudBridge.php index aa6340a1..e145e047 100644 --- a/bridges/MixCloudBridge.php +++ b/bridges/MixCloudBridge.php @@ -4,7 +4,7 @@ class MixCloudBridge extends BridgeAbstract { const MAINTAINER = 'Alexis CHEMEL'; const NAME = 'MixCloud'; - const URI = 'https://mixcloud.com/'; + const URI = 'https://www.mixcloud.com/'; const CACHE_TIMEOUT = 3600; // 1h const DESCRIPTION = 'Returns latest musics on user stream'; @@ -24,7 +24,8 @@ class MixCloudBridge extends BridgeAbstract { } public function collectData(){ - + ini_set('user_agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0'); + $html = getSimpleHTMLDOM(self::URI . $this->getInput('u')) or returnServerError('Could not request MixCloud.'); From 443081c90b36dc50ba68740fc430f582c917d8a0 Mon Sep 17 00:00:00 2001 From: Thomas Dalichow <2012-02-05.github.com@thomasdalichow.de> Date: Wed, 6 Dec 2017 22:17:46 +0100 Subject: [PATCH 02/14] Fix double forward-slash in returned post URI leading to 404 --- bridges/MixCloudBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/MixCloudBridge.php b/bridges/MixCloudBridge.php index e145e047..68337e46 100644 --- a/bridges/MixCloudBridge.php +++ b/bridges/MixCloudBridge.php @@ -4,7 +4,7 @@ class MixCloudBridge extends BridgeAbstract { const MAINTAINER = 'Alexis CHEMEL'; const NAME = 'MixCloud'; - const URI = 'https://www.mixcloud.com/'; + const URI = 'https://www.mixcloud.com'; const CACHE_TIMEOUT = 3600; // 1h const DESCRIPTION = 'Returns latest musics on user stream'; @@ -26,7 +26,7 @@ class MixCloudBridge extends BridgeAbstract { public function collectData(){ ini_set('user_agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0'); - $html = getSimpleHTMLDOM(self::URI . $this->getInput('u')) + $html = getSimpleHTMLDOM(self::URI . '/' . $this->getInput('u')) or returnServerError('Could not request MixCloud.'); foreach($html->find('section.card') as $element) { From d34987f9c12804f273a346fa5f4ee3d19cefae66 Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Sat, 23 Dec 2017 15:57:40 -0500 Subject: [PATCH 03/14] PC Gamer bridge initial commit with most read stories --- bridges/PcGamerBridge.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 bridges/PcGamerBridge.php diff --git a/bridges/PcGamerBridge.php b/bridges/PcGamerBridge.php new file mode 100644 index 00000000..b6ebcdc0 --- /dev/null +++ b/bridges/PcGamerBridge.php @@ -0,0 +1,23 @@ +getURI(), 300); + $stories = $html->find('div#popularcontent li.most-popular-item'); + foreach ($stories as $element) { + $item['uri'] = $element->find('a', 0)->href; + $articleHtml = getSimpleHTMLDOMCached($item['uri']); + $item['title'] = $element->find('h4 a', 0)->plaintext; + $item['timestamp'] = strtotime($articleHtml->find('meta[name=pub_date]', 0)->content); + $item['content'] = $articleHtml->find('meta[name=description]', 0)->content; + $item['author'] = $articleHtml->find('a[itemprop=author]', 0)->plaintext; + $this->items[] = $item; + } + } +} From fbbcd02384eb8b997256b9994172ccbc429322cd Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Sun, 24 Dec 2017 16:45:56 -0500 Subject: [PATCH 04/14] apply phpcbf for automatic style fixes --- bridges/PcGamerBridge.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/bridges/PcGamerBridge.php b/bridges/PcGamerBridge.php index b6ebcdc0..e0e55ce4 100644 --- a/bridges/PcGamerBridge.php +++ b/bridges/PcGamerBridge.php @@ -1,23 +1,23 @@ getURI(), 300); - $stories = $html->find('div#popularcontent li.most-popular-item'); - foreach ($stories as $element) { - $item['uri'] = $element->find('a', 0)->href; - $articleHtml = getSimpleHTMLDOMCached($item['uri']); - $item['title'] = $element->find('h4 a', 0)->plaintext; - $item['timestamp'] = strtotime($articleHtml->find('meta[name=pub_date]', 0)->content); - $item['content'] = $articleHtml->find('meta[name=description]', 0)->content; - $item['author'] = $articleHtml->find('a[itemprop=author]', 0)->plaintext; - $this->items[] = $item; - } - } + public function collectData() + { + $html = getSimpleHTMLDOMCached($this->getURI(), 300); + $stories = $html->find('div#popularcontent li.most-popular-item'); + foreach ($stories as $element) { + $item['uri'] = $element->find('a', 0)->href; + $articleHtml = getSimpleHTMLDOMCached($item['uri']); + $item['title'] = $element->find('h4 a', 0)->plaintext; + $item['timestamp'] = strtotime($articleHtml->find('meta[name=pub_date]', 0)->content); + $item['content'] = $articleHtml->find('meta[name=description]', 0)->content; + $item['author'] = $articleHtml->find('a[itemprop=author]', 0)->plaintext; + $this->items[] = $item; + } + } } From c5fe9a6dc07e1377a261b4b35ef0f77b38f8cf01 Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Thu, 28 Dec 2017 19:52:46 -0500 Subject: [PATCH 05/14] mark places where a new variable is needed --- bridges/YoutubeBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/YoutubeBridge.php b/bridges/YoutubeBridge.php index 1db07352..4d76851a 100644 --- a/bridges/YoutubeBridge.php +++ b/bridges/YoutubeBridge.php @@ -91,7 +91,7 @@ class YoutubeBridge extends BridgeAbstract { if(strpos($vid, 'googleads') === false) $this->ytBridgeAddItem($vid, $title, $author, $desc, $time); } - $this->request = $this->ytBridgeFixTitle($xml->find('feed > title', 0)->plaintext); + $this->request = $this->ytBridgeFixTitle($xml->find('feed > title', 0)->plaintext); // TODO: use another variable for feed title. } private function ytBridgeParseHtmlListing($html, $element_selector, $title_selector){ @@ -164,7 +164,7 @@ class YoutubeBridge extends BridgeAbstract { $html = $this->ytGetSimpleHTMLDOM($url_listing) or returnServerError("Could not request YouTube. Tried:\n - $url_listing"); $this->ytBridgeParseHtmlListing($html, 'tr.pl-video', '.pl-video-title a'); - $this->request = 'Playlist: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); + $this->request = 'Playlist: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // TODO: use another variable for feed title. } elseif($this->getInput('s')) { /* search mode */ $this->request = $this->getInput('s'); $page = 1; @@ -182,7 +182,7 @@ class YoutubeBridge extends BridgeAbstract { or returnServerError("Could not request YouTube. Tried:\n - $url_listing"); $this->ytBridgeParseHtmlListing($html, 'div.yt-lockup', 'h3'); - $this->request = 'Search: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); + $this->request = 'Search: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // TODO: use another variable for feed title. } else { /* no valid mode */ returnClientError("You must either specify either:\n - YouTube username (?u=...)\n - Channel id (?c=...)\n - Playlist id (?p=...)\n - Search (?s=...)"); From 08713769225cfad9e7eed89ebaba174b6a308a1c Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Thu, 28 Dec 2017 20:14:11 -0500 Subject: [PATCH 06/14] store feed name in new variable, switch getName on queriedContext, remove 'bridge' from name for feeds, fixes #609 --- bridges/YoutubeBridge.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/bridges/YoutubeBridge.php b/bridges/YoutubeBridge.php index 4d76851a..69b7e232 100644 --- a/bridges/YoutubeBridge.php +++ b/bridges/YoutubeBridge.php @@ -91,7 +91,7 @@ class YoutubeBridge extends BridgeAbstract { if(strpos($vid, 'googleads') === false) $this->ytBridgeAddItem($vid, $title, $author, $desc, $time); } - $this->request = $this->ytBridgeFixTitle($xml->find('feed > title', 0)->plaintext); // TODO: use another variable for feed title. + $this->feedName = $this->ytBridgeFixTitle($xml->find('feed > title', 0)->plaintext); // feedName will be used by getName() } private function ytBridgeParseHtmlListing($html, $element_selector, $title_selector){ @@ -164,7 +164,7 @@ class YoutubeBridge extends BridgeAbstract { $html = $this->ytGetSimpleHTMLDOM($url_listing) or returnServerError("Could not request YouTube. Tried:\n - $url_listing"); $this->ytBridgeParseHtmlListing($html, 'tr.pl-video', '.pl-video-title a'); - $this->request = 'Playlist: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // TODO: use another variable for feed title. + $this->feedName = 'Playlist: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // feedName will be used by getName() } elseif($this->getInput('s')) { /* search mode */ $this->request = $this->getInput('s'); $page = 1; @@ -182,7 +182,7 @@ class YoutubeBridge extends BridgeAbstract { or returnServerError("Could not request YouTube. Tried:\n - $url_listing"); $this->ytBridgeParseHtmlListing($html, 'div.yt-lockup', 'h3'); - $this->request = 'Search: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // TODO: use another variable for feed title. + $this->feedName = 'Search: ' . str_replace(' - YouTube', '', $html->find('title', 0)->plaintext); // feedName will be used by getName() } else { /* no valid mode */ returnClientError("You must either specify either:\n - YouTube username (?u=...)\n - Channel id (?c=...)\n - Playlist id (?p=...)\n - Search (?s=...)"); @@ -190,6 +190,15 @@ class YoutubeBridge extends BridgeAbstract { } public function getName(){ - return (!empty($this->request) ? $this->request . ' - ' : '') . 'YouTube Bridge'; - } + // Name depends on queriedContext: + switch($this->queriedContext) { + case 'By username': + case 'By channel id': + case 'By playlist Id': + case 'Search result': + return $this->feedName . ' - ' . 'YouTube'; // We already know it's a bridge, right? + default: + return parent::getName(); + } + } } From c14b2c6905a392e0663070413c0e45db0ecdb7ff Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Thu, 28 Dec 2017 20:19:35 -0500 Subject: [PATCH 07/14] address phpcs style errors --- bridges/YoutubeBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/YoutubeBridge.php b/bridges/YoutubeBridge.php index 69b7e232..3d81daeb 100644 --- a/bridges/YoutubeBridge.php +++ b/bridges/YoutubeBridge.php @@ -196,9 +196,9 @@ class YoutubeBridge extends BridgeAbstract { case 'By channel id': case 'By playlist Id': case 'Search result': - return $this->feedName . ' - ' . 'YouTube'; // We already know it's a bridge, right? - default: - return parent::getName(); + return $this->feedName . ' - YouTube'; // We already know it's a bridge, right? + default: + return parent::getName(); } } } From 5a763aee8dd16ec7c0be2942e19a58260b081ab7 Mon Sep 17 00:00:00 2001 From: lalannev <35263821+lalannev@users.noreply.github.com> Date: Tue, 9 Jan 2018 14:57:17 +0100 Subject: [PATCH 08/14] Update LegifranceJOBridge.php --- bridges/LegifranceJOBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/LegifranceJOBridge.php b/bridges/LegifranceJOBridge.php index 348be8f1..d97fcff9 100644 --- a/bridges/LegifranceJOBridge.php +++ b/bridges/LegifranceJOBridge.php @@ -42,10 +42,10 @@ class LegifranceJOBridge extends BridgeAbstract { $html = getSimpleHTMLDOM(self::URI) or $this->returnServer('Unable to download ' . self::URI); - $this->author = trim($html->find('h2.title', 0)->plaintext); + $this->author = trim($html->find('h2.titleJO', 0)->plaintext); $uri = $html->find('h2.titleELI', 0)->plaintext; $this->uri = trim(substr($uri, strpos($uri, 'https'))); - $this->timestamp = strtotime(substr($this->uri, strpos($this->uri, 'eli/jo/') + strlen('eli/jo/'))); + $this->timestamp = strtotime(substr($this->uri, strpos($this->uri, 'eli/jo/') + strlen('eli/jo/'), -5)); foreach($html->find('h3') as $section) { $subsections = $section->nextSibling()->find('h4'); From 60f7a2b3e4eb70e4c5e00e09b341da2a04ff594e Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 10 Jan 2018 11:45:55 +0000 Subject: [PATCH 09/14] README - sort lists alphabetically This makes them easier to scan and check "does rss-bridge support service X I'm interested in?" :) --- README.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index e36f22b2..45bbc6d9 100644 --- a/README.md +++ b/README.md @@ -7,23 +7,23 @@ rss-bridge is a PHP project capable of generating ATOM feeds for websites which Supported sites/pages (main) === - * `FlickrExplore` : [Latest interesting images](http://www.flickr.com/explore) from Flickr - * `GoogleSearch` : Most recent results from Google Search - * `GooglePlus` : Most recent posts of user timeline - * `Twitter` : Return keyword/hashtag search or user timeline - * `Identi.ca` : Identica user timeline (Should be compatible with other Pump.io instances) - * `YouTube` : YouTube user channel, playlist or search - * `Cryptome` : Returns the most recent documents from [Cryptome.org](http://cryptome.org/) - * `DansTonChat`: Most recent quotes from [danstonchat.com](http://danstonchat.com/) - * `DuckDuckGo`: Most recent results from [DuckDuckGo.com](https://duckduckgo.com/) - * `Instagram`: Most recent photos from an Instagram user - * `OpenClassrooms`: Lastest tutorials from [fr.openclassrooms.com](http://fr.openclassrooms.com/) - * `Pinterest`: Most recent photos from user or search - * `ScmbBridge`: Newest stories from [secouchermoinsbete.fr](http://secouchermoinsbete.fr/) - * `Wikipedia`: highlighted articles from [Wikipedia](https://wikipedia.org/) in English, German, French or Esperanto - * `Bandcamp` : Returns last release from [bandcamp](https://bandcamp.com/) for a tag - * `ThePirateBay` : Returns the newest indexed torrents from [The Pirate Bay](https://thepiratebay.se/) with keywords - * `Facebook` : Returns the latest posts on a page or profile on [Facebook](https://facebook.com/) +* `Bandcamp` : Returns last release from [bandcamp](https://bandcamp.com/) for a tag +* `Cryptome` : Returns the most recent documents from [Cryptome.org](http://cryptome.org/) +* `DansTonChat`: Most recent quotes from [danstonchat.com](http://danstonchat.com/) +* `DuckDuckGo`: Most recent results from [DuckDuckGo.com](https://duckduckgo.com/) +* `Facebook` : Returns the latest posts on a page or profile on [Facebook](https://facebook.com/) +* `FlickrExplore` : [Latest interesting images](http://www.flickr.com/explore) from Flickr +* `GooglePlus` : Most recent posts of user timeline +* `GoogleSearch` : Most recent results from Google Search +* `Identi.ca` : Identica user timeline (Should be compatible with other Pump.io instances) +* `Instagram`: Most recent photos from an Instagram user +* `OpenClassrooms`: Lastest tutorials from [fr.openclassrooms.com](http://fr.openclassrooms.com/) +* `Pinterest`: Most recent photos from user or search +* `ScmbBridge`: Newest stories from [secouchermoinsbete.fr](http://secouchermoinsbete.fr/) +* `ThePirateBay` : Returns the newest indexed torrents from [The Pirate Bay](https://thepiratebay.se/) with keywords +* `Twitter` : Return keyword/hashtag search or user timeline +* `Wikipedia`: highlighted articles from [Wikipedia](https://wikipedia.org/) in English, German, French or Esperanto +* `YouTube` : YouTube user channel, playlist or search Plus [many other bridges](bridges/) to enable, thanks to the community @@ -31,11 +31,11 @@ Output format === Output format can take several forms: - * `Atom` : ATOM Feed, for use in RSS/Feed readers - * `Mrss` : MRSS Feed, for use in RSS/Feed readers - * `Json` : Json, for consumption by other applications. - * `Html` : Simple html page. - * `Plaintext` : raw text (php object, as returned by print_r) +* `Atom` : ATOM Feed, for use in RSS/Feed readers +* `Html` : Simple html page. +* `Json` : Json, for consumption by other applications. +* `Mrss` : MRSS Feed, for use in RSS/Feed readers +* `Plaintext` : raw text (php object, as returned by print_r) Screenshot === From 671cba4f68b59adac1c43f6d29fdc050d4c183f4 Mon Sep 17 00:00:00 2001 From: Teromene Date: Thu, 11 Jan 2018 11:41:25 +0000 Subject: [PATCH 10/14] Update .travis.yml Try to fix build failure --- .travis.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 794fdbf8..cd5e2d9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,20 +2,6 @@ dist: trusty sudo: false language: php -before_install: - # Circumvent a bug in current Travis CI builds using Ubuntu Trusty, where the - # include_path is wrong. - # - # Default is: - # - include_path='.:/home/travis/.phpenv/versions/5.6.31/share/pear' - # - # Should be: - # - include_path='.:/home/travis/.phpenv/versions/5.6.31/lib/php/pear' - # - # This applies to all builds except hhvm and nightly. Once the distro is fixed - # the following line can be removed - - if [[ ${TRAVIS_PHP_VERSION:0:1} == "5" || ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then echo "include_path='.:/home/travis/.phpenv/versions/$(phpenv version-name)/lib/php/pear'" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi - install: - pear channel-update pear.php.net - pear install PHP_CodeSniffer @@ -35,4 +21,4 @@ matrix: allow_failures: - php: hhvm - - php: nightly \ No newline at end of file + - php: nightly From e59a6f4c9e9a4b7f33e48d39d462ca3937f0c4cb Mon Sep 17 00:00:00 2001 From: Teromene Date: Thu, 11 Jan 2018 11:44:51 +0000 Subject: [PATCH 11/14] Update MixCloudBridge.php Fix whitespace at start of line --- bridges/MixCloudBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/MixCloudBridge.php b/bridges/MixCloudBridge.php index 68337e46..723f634a 100644 --- a/bridges/MixCloudBridge.php +++ b/bridges/MixCloudBridge.php @@ -25,7 +25,7 @@ class MixCloudBridge extends BridgeAbstract { public function collectData(){ ini_set('user_agent', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0'); - + $html = getSimpleHTMLDOM(self::URI . '/' . $this->getInput('u')) or returnServerError('Could not request MixCloud.'); From 90d7ae87768614ccb808676131ede55aabee7c10 Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Fri, 12 Jan 2018 07:07:40 -0500 Subject: [PATCH 12/14] Fix twitter list filter test #613, fix and change getName() for lists. (#614) --- bridges/TwitterBridge.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bridges/TwitterBridge.php b/bridges/TwitterBridge.php index 66024cee..aedb3723 100644 --- a/bridges/TwitterBridge.php +++ b/bridges/TwitterBridge.php @@ -77,9 +77,7 @@ class TwitterBridge extends BridgeAbstract { $param = 'u'; break; case 'By list': - $specific = $this->getInput('user'); - $param = 'list'; - break; + return $this->getInput('list') . ' - Twitter list by ' . $this->getInput('user'); default: return parent::getName(); } return 'Twitter ' . $specific . $this->getInput($param); @@ -165,7 +163,7 @@ class TwitterBridge extends BridgeAbstract { switch($this->queriedContext) { case 'By list': // Check if filter applies to list (using raw content) - if(!is_null($this->getInput('filter'))) { + if($this->getInput('filter')) { if(stripos($tweet->find('p.js-tweet-text', 0)->plaintext, $this->getInput('filter')) === false) { continue 2; // switch + for-loop! } From a07874d46839acf387895b585cbea7990e0e6fc7 Mon Sep 17 00:00:00 2001 From: Matt DeMoss Date: Fri, 12 Jan 2018 07:08:15 -0500 Subject: [PATCH 13/14] Initial commit for Bloomberg bridge with top stories and search (#607) * initial commit for Bloomberg bridge with top stories and search --- bridges/BloombergBridge.php | 65 +++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 bridges/BloombergBridge.php diff --git a/bridges/BloombergBridge.php b/bridges/BloombergBridge.php new file mode 100644 index 00000000..8aff0ec7 --- /dev/null +++ b/bridges/BloombergBridge.php @@ -0,0 +1,65 @@ + array(), + 'From Search' => array( + 'q' => array( + 'name' => 'Keyword', + 'required' => true + ) + ) + ); + + public function getName() + { + switch($this->queriedContext) { + case 'Trending Stories': + return self::NAME . ' Trending Stories'; + case 'From Search': + if (!is_null($this->getInput('q'))) { + return self::NAME . ' Search : ' . $this->getInput('q'); + } + break; + } + + return parent::getName(); + } + + public function collectData() + { + switch($this->queriedContext) { + case 'Trending Stories': // Get list of top new
s from the front page. + $html = getSimpleHTMLDOMCached($this->getURI(), 300); + $stories = $html->find('ul.top-news-v3__stories article.top-news-v3-story'); + break; + case 'From Search': // Get list of
elements from search. + $html = getSimpleHTMLDOMCached( + $this->getURI() . + 'search?sort=time:desc&page=1&query=' . + urlencode($this->getInput('q')), 300 + ); + $stories = $html->find('div.search-result-items article.search-result-story'); + break; + } + foreach ($stories as $element) { + $item['uri'] = $element->find('h1 a', 0)->href; + if (preg_match('#^https://#i', $item['uri']) !== 1) { + $item['uri'] = $this->getURI() . $item['uri']; + } + $articleHtml = getSimpleHTMLDOMCached($item['uri']); + if (!$articleHtml) { + continue; + } + $item['title'] = $element->find('h1 a', 0)->plaintext; + $item['timestamp'] = strtotime($articleHtml->find('meta[name=iso-8601-publish-date],meta[name=date]', 0)->content); + $item['content'] = $articleHtml->find('meta[name=description]', 0)->content; + $this->items[] = $item; + } + } +} From be03764029eac64a12f847fe2cc361b4a95c0acf Mon Sep 17 00:00:00 2001 From: Tameroski Date: Tue, 23 Jan 2018 12:27:45 +0100 Subject: [PATCH 14/14] Fixing double quote issue at the end of URL (#623) --- bridges/FacebookBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php index d2f8b915..90f3d74c 100644 --- a/bridges/FacebookBridge.php +++ b/bridges/FacebookBridge.php @@ -46,7 +46,7 @@ class FacebookBridge extends BridgeAbstract { if(is_array($matches) && count($matches) > 1) { $link = $matches[1]; if(strpos($link, '/') === 0) - $link = self::URI . $link . '"'; + $link = self::URI . $link; if(strpos($link, 'facebook.com/l.php?u=') !== false) $link = urldecode(extractFromDelimiters($link, 'facebook.com/l.php?u=', '&')); return ' href="' . $link . '"';