zebpalmer / pyqrz Goto Github PK
View Code? Open in Web Editor NEWPython module to query QRZ's Ham Radio Callsign Database (via XML API)
Python module to query QRZ's Ham Radio Callsign Database (via XML API)
I removed the local xml cache implementation in 0.1.0 as it needed some TLC, it will be replaced in the next version with a sqlite cache. this issue tracks that replacement.
Running code of the qrz_example.py I obtain:
/site-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) Traceback (most recent call last): File "test.py", line 16, in <module> result = qrz.callsign("w7atc") File "/Users/Davide/.pyenv/versions/env_qrz/lib/python3.6/site-packages/qrz/qrz_query.py", line 59, in callsign self._get_session() File "/Users/Davide/.pyenv/versions/env_qrz/lib/python3.6/site-packages/qrz/qrz_query.py", line 51, in _get_session self._session_key = regex.search(r.content).group(1) TypeError: cannot use a string pattern on a bytes-like object
Receiving a Key Error
Traceback (most recent call last):
File "Z:\scriptpath\qrztest.py", line 24, in <module>
qrzinfo = qrz.callsign("K8MRD")
File "C:\PythonPath\lib\site-packages\qrz\qrz_query.py", line 51, in callsign
self._get_session()
File "C:\PythonPath\lib\site-packages\qrz\qrz_query.py", line 44, in _get_session
self._session_key = raw_session['QRZDatabase']['Session']['Key']
KeyError: 'Key'
I dug a little to find that this is thrown when a 'Username/password incorrect' error is sent under the session key, This is apparently also sometimes thrown with correct passwords if they contain specific special characters such as ?@#$%&
I can send a pull request with my fix if you'd like.
there is also a warning from connectionpool for InsecureRequestWarning, not sure if that's new or not?
currently running on an old jenkins instance. need to move to travis.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.