mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
adding scraping ant infos as we now need to use residental proxies
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const { metaInformation } = require('../provider/immoscout');
|
||||
//to better confure re-capture chose a random proxy each time we do a call
|
||||
//to better configure re-capture chose a random proxy each time we do a call
|
||||
const proxies = ['ae', 'br', 'cn', 'de', 'es', 'fr', 'gb', 'hk', 'in', 'it', 'il', 'jp', 'nl', 'ru', 'sa', 'us', 'cz'];
|
||||
const config = require('../../conf/config.json');
|
||||
|
||||
@@ -12,7 +12,9 @@ exports.transformUrlForScrapingAnt = (url, id) => {
|
||||
|
||||
if (isImmoscout(id)) {
|
||||
//only do calls to scrapingAnt when dealing with Immoscout
|
||||
url = `https://api.scrapingant.com/v1/general?url=${encodeURIComponent(url)}&proxy_country=${randomProxy}`;
|
||||
url = `https://api.scrapingant.com/v1/general?url=${encodeURIComponent(
|
||||
url
|
||||
)}&proxy_country=${randomProxy}&proxy_type=residential`;
|
||||
}
|
||||
return url;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user