mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix tests cont
This commit is contained in:
parent
1b8850ed33
commit
ad99f933e5
6 changed files with 6 additions and 6 deletions
|
|
@ -27,7 +27,7 @@ exports.appleNewsHandler = {
|
|||
const response = await axios.get(url, { headers: { 'User-Agent': MOBILE_USER_AGENT } } );
|
||||
const data = response.data;
|
||||
|
||||
const dom = new parseHTML(data).document;
|
||||
const dom = parseHTML(data).document;
|
||||
|
||||
// make sure its a valid URL by wrapping in new URL
|
||||
const u = new URL(dom.querySelector('span.click-here').parentNode.href);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ exports.bloombergHandler = {
|
|||
'block_resources': false,
|
||||
}
|
||||
})
|
||||
const dom = new parseHTML(response.data).document;
|
||||
const dom = parseHTML(response.data).document;
|
||||
return { title: dom.title, content: dom.querySelector('body').innerHTML, url: url }
|
||||
} catch (error) {
|
||||
console.error('error prehandling bloomberg url', error)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ exports.derstandardHandler = {
|
|||
const content = response.data;
|
||||
|
||||
var title = undefined;
|
||||
const dom = new parseHTML(content).document;
|
||||
const dom = parseHTML(content).document;
|
||||
const titleElement = dom.querySelector('.article-title')
|
||||
if (!titleElement) {
|
||||
title = titleElement.textContent
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ exports.appleNewsHandler = {
|
|||
const response = await axios.get(url, { headers: { 'User-Agent': MOBILE_USER_AGENT } } );
|
||||
const data = response.data;
|
||||
|
||||
const dom = new parseHTML(data).document;
|
||||
const dom = parseHTML(data).document;
|
||||
|
||||
// make sure its a valid URL by wrapping in new URL
|
||||
const u = new URL(dom.querySelector('span.click-here').parentNode.href);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ exports.bloombergHandler = {
|
|||
'block_resources': false,
|
||||
}
|
||||
})
|
||||
const dom = new parseHTML(response.data).document;
|
||||
const dom = parseHTML(response.data).document;
|
||||
return { title: dom.title, content: dom.querySelector('body').innerHTML, url: url }
|
||||
} catch (error) {
|
||||
console.error('error prehandling bloomberg url', error)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ exports.derstandardHandler = {
|
|||
const content = response.data;
|
||||
|
||||
var title = undefined;
|
||||
const dom = new parseHTML(content).document;
|
||||
const dom = parseHTML(content).document;
|
||||
const titleElement = dom.querySelector('.article-title')
|
||||
if (!titleElement) {
|
||||
title = titleElement.textContent
|
||||
|
|
|
|||
Loading…
Reference in a new issue