Skip to content

Commit

Permalink
[toby-p#46] Fix floorplan URL selector
Browse files Browse the repository at this point in the history
Fix issue reported that finds floorplans now require a different
selector
  • Loading branch information
Sam Briggs committed Oct 27, 2022
1 parent cdb79a2 commit 39c192d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rightmove_webscraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _get_page(self, request_content: str, get_floorplans: bool = False):
if status_code != 200:
continue
tree = html.fromstring(content)
xp_floorplan_url = """//*[@id="floorplanTabs"]/div[2]/div[2]/img/@src"""
xp_floorplan_url = """//*[contains(@alt, 'Floorplan')]/@src"""
floorplan_url = tree.xpath(xp_floorplan_url)
if floorplan_url:
floorplan_urls.append(floorplan_url[0])
Expand Down

0 comments on commit 39c192d

Please sign in to comment.