new(basic.gblib): New batch features.

This commit is contained in:
Rodrigo Rodriguez 2024-06-15 22:40:50 -03:00
parent 515aae801b
commit aa35354a2b

View file

@ -854,8 +854,10 @@ export class KBService implements IGBKBService {
}
async saveHtmlPage(min, url: string, page: Page): Promise<string | null> {
const response = await page.goto(url);
let response = await page.goto(url);
if (!response) {
response = await page.waitForResponse(() => true);
}
if (response && response.headers && response.status() === 200) {
const contentType = response.headers()['content-type'];
if (contentType && contentType.includes('text/html')) {