Prettify script

pull/77/head
MillenniumEarl 2021-03-10 11:35:30 +01:00
parent e04b7e2338
commit 9ea1443074
1 changed files with 10 additions and 2 deletions

View File

@ -17,7 +17,13 @@ import { urls } from "../../constants/url";
import { POST, THREAD } from "../../constants/css-selector";
import { fetchHTML, fetchPOSTResponse } from "../../network-helper";
import Shared from "../../shared";
import { InvalidID, INVALID_THREAD_ID, ParameterError, UserNotLogged, USER_NOT_LOGGED } from "../errors";
import {
InvalidID,
INVALID_THREAD_ID,
ParameterError,
UserNotLogged,
USER_NOT_LOGGED
} from "../errors";
import { getJSONLD, TJsonLD } from "../../scrape-data/json-ld";
import shared from "../../shared";
@ -238,7 +244,9 @@ export default class Thread implements ILazy {
// Fetch the HTML source
const response = await fetchHTML(this.url);
const result = response.applyOnSuccess(this.elaborateResponse);
const result = response.applyOnSuccess(
async (html) => await this.elaborateResponse(html)
);
if (result.isFailure()) throw result.value;
}