mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2026-04-21 06:13:57 +00:00
using lxml to parse qrz.com xml responses instead of html.parser
This commit is contained in:
parent
cb9b23c96f
commit
82e2b93cd5
5 changed files with 15 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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])))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue