mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[GoogleScholarBridge] Minor patch (#3814)
* Do not add RSS entry if Check for updates is found in the article title - avoids repeat entries
This commit is contained in:
parent
44ff2f2cf8
commit
206edaedf5
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class GoogleScholarBridge extends BridgeAbstract
|
class GoogleScholarBridge extends BridgeAbstract
|
||||||
{
|
{
|
||||||
const NAME = 'Google Scholar v2';
|
const NAME = 'Google Scholar';
|
||||||
const URI = 'https://scholar.google.com/';
|
const URI = 'https://scholar.google.com/';
|
||||||
const DESCRIPTION = 'Search for publications or follow authors on Google Scholar.';
|
const DESCRIPTION = 'Search for publications or follow authors on Google Scholar.';
|
||||||
const MAINTAINER = 'nicholasmccarthy';
|
const MAINTAINER = 'nicholasmccarthy';
|
||||||
@ -193,6 +193,11 @@ class GoogleScholarBridge extends BridgeAbstract
|
|||||||
$articleUrl = $articleTitleElement->find('a', 0)->href;
|
$articleUrl = $articleTitleElement->find('a', 0)->href;
|
||||||
$articleTitle = $articleTitleElement->plaintext;
|
$articleTitle = $articleTitleElement->plaintext;
|
||||||
|
|
||||||
|
// Break the loop if 'Check for Updates' is found in the article title
|
||||||
|
if (strpos($articleTitle, 'Check for updates') !== false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$articleDateElement = $publication->find('div[class="gs_a"]', 0);
|
$articleDateElement = $publication->find('div[class="gs_a"]', 0);
|
||||||
$articleDate = $articleDateElement ? $articleDateElement->plaintext : '';
|
$articleDate = $articleDateElement ? $articleDateElement->plaintext : '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user