Renamed var.
This commit is contained in:
@@ -11,11 +11,11 @@ const fetch = async (url, options = {}) => {
|
||||
newOptions["headers"] = {};
|
||||
}
|
||||
newOptions["headers"]["User-Agent"] = USER_AGENT;
|
||||
const newUrl = USE_SCRAPER_API
|
||||
const urlAdaptedForScraping = USE_SCRAPER_API
|
||||
? `http://api.scraperapi.com/?api_key=${SCRAPER_API_KEY}&url=${url}`
|
||||
: url;
|
||||
|
||||
return nodeFetch(newUrl, newOptions);
|
||||
return nodeFetch(urlAdaptedForScraping, newOptions);
|
||||
};
|
||||
|
||||
module.exports = fetch;
|
||||
|
||||
Reference in New Issue
Block a user