Skip to content

Commit

Permalink
fix: epic new page layout (#363)
Browse files Browse the repository at this point in the history
Signed-off-by: Eiko Wagenknecht <git@eiko-wagenknecht.de>
  • Loading branch information
eikowagenknecht committed Aug 2, 2024
1 parent 6d0869f commit 3e0f855
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lootscraper/scraper/epic_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_offers_url(self) -> str:
return OFFER_URL

def get_page_ready_selector(self) -> str:
return "h2:has-text('Free Games')"
return "h5:has-text('Free Games')"

def get_offer_handlers(self, page: Page) -> list[OfferHandler]:
return [
Expand All @@ -70,7 +70,7 @@ async def read_raw_offer(self, element: Locator) -> RawOffer:
await element.scroll_into_view_if_needed()

title = await element.locator(
'//span[text()="Free Now - "]/ancestor::div[2]/descendant::span[1]',
"//h6",
).text_content()
if title is None:
raise ValueError("Couldn't find title.")
Expand Down

0 comments on commit 3e0f855

Please sign in to comment.