Skip to content

Commit

Permalink
Merge pull request #136 from zabuldon/master
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Tse <alandtse@gmail.com>
  • Loading branch information
alandtse committed Feb 2, 2021
2 parents b326d37 + bbf4b9c commit 631636f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

<!--next-version-placeholder-->

## v0.11.5 (2021-02-02)
### Fix
* Address attribute error properly for form ([`11f59ea`](https://github.com/zabuldon/teslajsonpy/commit/11f59eaa398d70e1444151414cc5235ce68584d9))

## v0.11.4 (2021-02-02)
### Fix
* Check for existence of input field in form ([`613406e`](https://github.com/zabuldon/teslajsonpy/commit/613406e4f6bc95f7306b18e54ba47ea718b63fd8))

## v0.11.3 (2021-01-31)
### Fix
* Detect missing name/password ([`c4f8c54`](https://github.com/zabuldon/teslajsonpy/commit/c4f8c54d0149fa0b22dfcb299cb4ae6b4cbffaa3))
Expand Down
2 changes: 1 addition & 1 deletion teslajsonpy/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
https://github.com/zabuldon/teslajsonpy
"""

__version__ = "0.11.3"
__version__ = "0.11.5"
15 changes: 8 additions & 7 deletions teslajsonpy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,14 @@ def get_inputs(soup: BeautifulSoup, searchfield=None) -> Dict[str, str]:
form = soup.find("form", searchfield)
if not form:
form = soup.find("form")
for field in form.find_all("input"):
try:
data[field["name"]] = ""
if field["type"] and field["type"] == "hidden":
data[field["name"]] = field["value"]
except BaseException: # pylint: disable=broad-except
pass
if form:
for field in form.find_all("input"):
try:
data[field["name"]] = ""
if field["type"] and field["type"] == "hidden":
data[field["name"]] = field["value"]
except BaseException: # pylint: disable=broad-except
pass
return data


Expand Down

0 comments on commit 631636f

Please sign in to comment.