using lxml to parse qrz.com xml responses instead of html.parser

This commit is contained in:
Tobias Wellnitz, DH1TW 2022-05-12 01:43:23 +02:00
parent cb9b23c96f
commit 82e2b93cd5
5 changed files with 15 additions and 4 deletions

View file

@ -1,6 +1,15 @@
Changelog
---------
PyHamtools 0.7.10
================
12. May 2022
* Using lxml to parse XML messages returned from qrz.com
* Upgraded dependencies
PyHamtools 0.7.9
================

View file

@ -136,7 +136,8 @@ class LookupLib(object):
else:
encodeurl = url + "?" + urllib.urlencode(params)
response = requests.get(encodeurl, timeout=10)
doc = BeautifulSoup(response.text, "html.parser")
# doc = BeautifulSoup(response.text, "html.parser")
doc = BeautifulSoup(response.text, "lxml")
session_key = None
if doc.session.key:
session_key = doc.session.key.text

View file

@ -1,3 +1,3 @@
VERSION = (0, 7, 9)
VERSION = (0, 7, 10)
__release__ = ''.join(['-.'[type(x) == int]+str(x) for x in VERSION])[1:]
__version__ = '.'.join((str(VERSION[0]), str(VERSION[1])))

View file

@ -1,4 +1,4 @@
pytest>=6.2.2; python_version>='3.6'
pytest>=7.0.0; python_version>='3.6'
pytest==4.6.11; python_version<='3.5' and python_version>='2.7'
pytest-blockage>=0.2.2
pytest-localserver>=0.5

View file

@ -20,7 +20,8 @@ setup(name='pyhamtools',
"requests>=2.21.0",
"ephem>=4.1.3",
"beautifulsoup4>=4.7.1",
"future>=0.17.1",
"lxml>=4.8.0",
"future>=0.18.2",
"redis>=2.10.6",
],
**kw