|
@@ -53,6 +53,15 @@ export default class Portal {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ // Adding hashtags if there is
|
|
|
+ if (this._scraperArticlesOptions.hashtags) {
|
|
|
+ message += `\n${Emojis.TAGS} ` ;
|
|
|
+ this._scraperArticlesOptions.hashtags.forEach(hashtag => {
|
|
|
+ message += "#" + hashtag + " "
|
|
|
+ });
|
|
|
+ }
|
|
|
+ message.trimEnd();
|
|
|
+
|
|
|
// To avoid publiposts (I'm lookint at you La Tercera >:-|)
|
|
|
if (article.link.includes("publirreportajes")) {
|
|
|
continue;
|
|
@@ -78,7 +87,7 @@ export default class Portal {
|
|
|
|
|
|
await this._mastodonClient.v1.statuses.create({ status: message, mediaIds });
|
|
|
await this._redisClient.store(
|
|
|
- article.link,
|
|
|
+ article.link.trim(),
|
|
|
date,
|
|
|
{ EX: this._scraperArticlesOptions.cacheExpiration ? this._scraperArticlesOptions.cacheExpiration : 60 * 60 * 24 }
|
|
|
); // EX: 24 hrs expiration
|