Merge pull request #19853 from home-assistant/upgrade-beautifulsoup4

Upgrade beautifulsoup4 to 4.7.1
pull/19868/head
Fabian Affolter 2019-01-08 00:13:50 +01:00 committed by GitHub
commit 493d2743ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -19,7 +19,7 @@ from homeassistant.const import (
INTERFACES = 2 INTERFACES = 2
DEFAULT_TIMEOUT = 10 DEFAULT_TIMEOUT = 10
REQUIREMENTS = ['beautifulsoup4==4.6.3'] REQUIREMENTS = ['beautifulsoup4==4.7.1']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -81,13 +81,14 @@ class LinksysAPDeviceScanner(DeviceScanner):
request = self._make_request(interface) request = self._make_request(interface)
self.last_results.extend( self.last_results.extend(
[x.find_all('td')[1].text [x.find_all('td')[1].text
for x in BS(request.content, "html.parser") for x in BS(request.content, 'html.parser')
.find_all(class_='section-row')] .find_all(class_='section-row')]
) )
return True return True
def _make_request(self, unit=0): def _make_request(self, unit=0):
"""Create a request to get the data."""
# No, the '&&' is not a typo - this is expected by the web interface. # No, the '&&' is not a typo - this is expected by the web interface.
login = base64.b64encode(bytes(self.username, 'utf8')).decode('ascii') login = base64.b64encode(bytes(self.username, 'utf8')).decode('ascii')
pwd = base64.b64encode(bytes(self.password, 'utf8')).decode('ascii') pwd = base64.b64encode(bytes(self.password, 'utf8')).decode('ascii')

View File

@ -20,7 +20,7 @@ from homeassistant.helpers.entity import Entity
from homeassistant.exceptions import PlatformNotReady from homeassistant.exceptions import PlatformNotReady
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['beautifulsoup4==4.6.3'] REQUIREMENTS = ['beautifulsoup4==4.7.1']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View File

@ -18,7 +18,7 @@ from homeassistant.const import (
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle from homeassistant.util import Throttle
REQUIREMENTS = ['beautifulsoup4==4.6.3'] REQUIREMENTS = ['beautifulsoup4==4.7.1']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View File

@ -187,7 +187,7 @@ batinfo==0.4.2
# homeassistant.components.device_tracker.linksys_ap # homeassistant.components.device_tracker.linksys_ap
# homeassistant.components.sensor.scrape # homeassistant.components.sensor.scrape
# homeassistant.components.sensor.sytadin # homeassistant.components.sensor.sytadin
beautifulsoup4==4.6.3 beautifulsoup4==4.7.1
# homeassistant.components.zha # homeassistant.components.zha
bellows==0.7.0 bellows==0.7.0