mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a9d49899b |
@@ -168,6 +168,12 @@ export function initJobExecutionService({ providers, settings, intervalMs }) {
|
|||||||
const matchedProvider = providers.find((loaded) => loaded.metaInformation.id === prov.id);
|
const matchedProvider = providers.find((loaded) => loaded.metaInformation.id === prov.id);
|
||||||
matchedProvider.init(prov, job.blacklist);
|
matchedProvider.init(prov, job.blacklist);
|
||||||
|
|
||||||
|
if (browser && !browser.isConnected()) {
|
||||||
|
logger.debug('Browser is disconnected, nullifying to launch a new one.');
|
||||||
|
await puppeteerExtractor.closeBrowser(browser);
|
||||||
|
browser = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (!browser && matchedProvider.config.getListings == null) {
|
if (!browser && matchedProvider.config.getListings == null) {
|
||||||
browser = await puppeteerExtractor.launchBrowser(matchedProvider.config.url, {});
|
browser = await puppeteerExtractor.launchBrowser(matchedProvider.config.url, {});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "fredy",
|
"name": "fredy",
|
||||||
"version": "19.5.0",
|
"version": "19.5.1",
|
||||||
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
|
|||||||
Reference in New Issue
Block a user