Skip to content

Commit

Permalink
Fix an ambivalent xpath expression
Browse files Browse the repository at this point in the history
  • Loading branch information
LinqLover committed Nov 3, 2020
1 parent 4638922 commit e2c74a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gomus/_utils/scrape_gomus.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ def run(self):
# Language
bookings.loc[i, 'language'] = self.parse_text(
booking_details,
"div[contains(div[1]/dl[2]/dt/text(),'Sprache')]"
"/div[1]/dl[2]/dd").strip()
'''
div/div[1]/dl[2]/dd[
contains(preceding-sibling::dt[1]/text(), 'Sprache')
]'''
).strip()

try:
customer_details = tree_details.xpath(
Expand Down

0 comments on commit e2c74a9

Please sign in to comment.