1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-29 12:50:18 +02: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:
Nick McCarthy
2023-12-01 21:36:26 +00:00
committed by GitHub
parent 44ff2f2cf8
commit 206edaedf5

View File

@@ -2,7 +2,7 @@
class GoogleScholarBridge extends BridgeAbstract
{
const NAME = 'Google Scholar v2';
const NAME = 'Google Scholar';
const URI = 'https://scholar.google.com/';
const DESCRIPTION = 'Search for publications or follow authors on Google Scholar.';
const MAINTAINER = 'nicholasmccarthy';
@@ -193,6 +193,11 @@ class GoogleScholarBridge extends BridgeAbstract
$articleUrl = $articleTitleElement->find('a', 0)->href;
$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);
$articleDate = $articleDateElement ? $articleDateElement->plaintext : '';