mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03: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
1 changed files with 6 additions and 1 deletions
|
@ -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 : '';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue