Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/geizhals/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"domain": "geizhals",
"name": "Geizhals",
"documentation": "https://www.home-assistant.io/integrations/geizhals",
"requirements": ["geizhals==0.0.9"],
"requirements": ["geizhalscrawler==0.1"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This packages uses webscraping to gather information. This is not allowed and violated architectural decision record 0004 (ADR-0004).

See: https://github.com/home-assistant/architecture/blob/master/adr/0004-webscraping.md

Upstream code sample:

        # parse prices
        self.device.prices = []
        for tmp in soup.select('div.offer__price .gh_price'):
            matches = re.search(_REGEX, tmp.string)
            raw = '{}.{}'.format(matches.group(1),
                                 matches.group(2))
            self.device.prices += [float(raw)]

https://github.com/timherrm/geizhalscrawler/blob/60fe6b1db9344412541ce95235da5f8e61ff9a3a/geizhalscrawler/geizhalscrawler.py#L82

"codeowners": []
}
2 changes: 1 addition & 1 deletion homeassistant/components/geizhals/sensor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Parse prices of a device from geizhals."""
from datetime import timedelta

from geizhals import Device, Geizhals
from geizhalscrawler import Device, Geizhals
import voluptuous as vol

from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ gTTS==2.2.2
garminconnect==0.1.19

# homeassistant.components.geizhals
geizhals==0.0.9
geizhalscrawler==0.1

# homeassistant.components.geniushub
geniushub-client==0.6.30
Expand Down