|
@@ -50,7 +50,7 @@ export default class ScraperArticles {
|
|
|
const selector = this._options.linkSelector ?? "";
|
|
|
const url = selector !== "" ? this.getProperty(article, selector, Props.LINK) : this._options.url
|
|
|
return this._options.linkPrefix !== undefined && ! url.includes(this._options.linkPrefix)
|
|
|
- ? (this._options.linkPrefix + url).trim()
|
|
|
+ ? (this._options.linkPrefix + url.trim()).trim()
|
|
|
: url.trim();
|
|
|
}
|
|
|
|
|
@@ -61,7 +61,7 @@ export default class ScraperArticles {
|
|
|
|
|
|
if (imgUrl !== "") {
|
|
|
if (this._options.imagePrefix && ! imgUrl.includes(this._options.imagePrefix)) {
|
|
|
- imgUrl = this._options.imagePrefix + imgUrl;
|
|
|
+ imgUrl = this._options.imagePrefix + imgUrl.trim();
|
|
|
}
|
|
|
imgFile = this._scraper.scrapeFile(imgUrl)
|
|
|
.catch((err) => {
|