Skip to content

Commit

Permalink
fix(crawler): fix "fl" area code crawler
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkrist committed Dec 14, 2020
1 parent 29fb586 commit ece1daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/crawler/lib/fl.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const getMatch = (el, regex, isOptional) => {
return match
}

let nextEl = el.previousElementSibling
let nextEl = el.previousElementSibling || el.parentElement

while (nextEl && !match) {
match = nextEl.textContent.match(regex)
Expand Down Expand Up @@ -81,7 +81,7 @@ module.exports = () =>
)
.then(res => res.text())
.then(text => {
const dom = new JSDOM(text.replace(/<\/?span.*?>/gi, ''))
const dom = new JSDOM(text.replace(/<\/?(span|strong).*?>/gi, ''))
return [
...dom.window.document.querySelector(
'.einleitung + div > div > .toggler_container'
Expand Down

0 comments on commit ece1daf

Please sign in to comment.