[Library|Trunk]
SEO: update list of words for no-index filter add check about abstract git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60668 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
4ec2c7c124
commit
eb314179d3
|
@ -647,11 +647,15 @@ export class ResultLandingComponent {
|
|||
|| (this.resultLandingInfo.supplementedByResearchResults && this.resultLandingInfo.supplementedByResearchResults.length > 0)
|
||||
)
|
||||
);
|
||||
//words to exclude
|
||||
let title_authors_words = ["movie","hd","film","kimetsu", "1080p","4k","call of duty", "mobile hack", "TUBYDI"];
|
||||
let abstract_words = ["operacao-feliz-natal.blogspot.com", "moviedouban.site", "hack-expert-solution.link"];
|
||||
allow = allow && !(
|
||||
(this.hasKeyword(this.resultLandingInfo.title.toLowerCase()) || (this.resultLandingInfo.authors && this.hasKeyword(this.resultLandingInfo.authors.join(" ").toLowerCase()))) &&
|
||||
(this.hasKeyword(this.resultLandingInfo.title.toLowerCase(),title_authors_words) || (this.resultLandingInfo.authors && this.hasKeyword(this.resultLandingInfo.authors.join(" ").toLowerCase(),title_authors_words))
|
||||
|| (this.resultLandingInfo.description && this.hasKeyword(this.resultLandingInfo.description.toLowerCase(),abstract_words))
|
||||
) &&
|
||||
(this.resultLandingInfo.publisher == "Zenodo" ||
|
||||
this.resultLandingInfo.hostedBy_collectedFrom.filter( value => {return value.downloadName && value.downloadName.toLowerCase().indexOf("zenodo")!=-1}).length > 0));
|
||||
|
||||
if(!allow) {
|
||||
this._meta.updateTag({content: 'noindex'}, "name='robots'");
|
||||
}
|
||||
|
@ -661,8 +665,7 @@ export class ResultLandingComponent {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
private hasKeyword(value:string){
|
||||
let words = ["movie","hd","film","kimetsu", "1080p","4k","call of duty"];
|
||||
private hasKeyword(value:string, words:string[]){
|
||||
return words.filter( word => { return value.indexOf(word)!=-1}).length > 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue