Immediately set the current URL even prior to analysis.
This commit is contained in:
parent
e944977cb7
commit
39f59d129d
2 changed files with 13 additions and 5 deletions
10
scripts/external/processor.js
vendored
10
scripts/external/processor.js
vendored
|
@ -5,6 +5,7 @@ Process the information on the website and display it on screen.
|
|||
import scraper from "/scripts/external/scraper.js";
|
||||
import product from "/scripts/product.js";
|
||||
import injection from "/scripts/GUI/entrypoints/inject.js"
|
||||
import {global} from "/scripts/secretariat.js";
|
||||
|
||||
export default class processor {
|
||||
#filter;
|
||||
|
@ -23,13 +24,18 @@ export default class processor {
|
|||
constructor (filter) {
|
||||
this.#filter = filter;
|
||||
|
||||
this.notify();
|
||||
|
||||
this.targets = this.#filter[`data`];
|
||||
this.scrape();
|
||||
|
||||
if ((this.data) ? (((typeof (this.data)).includes(`obj`) && !Array.isArray(this.data)) ? Object.keys(this.data) : this.data) : false) {
|
||||
this.analyze();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async notify () {
|
||||
// Indicate that this is the last updated.
|
||||
await global.write([`last`], this.URL, -1);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue