saik0 / humblebundle-python Goto Github PK
View Code? Open in Web Editor NEWAn unofficial library for querying Humble Bundle
License: MIT License
An unofficial library for querying Humble Bundle
License: MIT License
The example doesn't include how to deal with having to solve captchas. The source code which I scanned through only mentions that a signed captcha query and its result are needed. How do I obtain those?
When I call client.login as example.py does, I get the following error. Replacing the credentials with my own doesn't fix the problem.
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/humblebundle/handlers.py", line 21, in parse_data
return response.json()
File "/usr/lib/python3.4/site-packages/requests/models.py", line 799, in json
return json.loads(self.text, **kwargs)
File "/usr/lib/python3.4/site-packages/simplejson/__init__.py", line 505, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.4/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3.4/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "examples.py", line 12, in <module>
client.login("[email protected]", "secret")
File "/usr/lib/python3.4/site-packages/humblebundle/decorators.py", line 20, in wrap
result = func(*args, **kwargs)
File "/usr/lib/python3.4/site-packages/humblebundle/client.py", line 112, in login
return handlers.login_handler(self, response)
File "/usr/lib/python3.4/site-packages/humblebundle/handlers.py", line 62, in login_handler
data = parse_data(response)
File "/usr/lib/python3.4/site-packages/humblebundle/handlers.py", line 23, in parse_data
raise HumbleParseException("Invalid JSON: %s", str(e), request=response.request, response=response)
humblebundle.exceptions.HumbleParseException: [Errno Invalid JSON: %s] Expecting value: line 1 column 1 (char 0)
Assuming I comment out a line to avoid #12 , during the iteration, I eventually get
Traceback (most recent call last):
File "examples.py", line 23, in <module>
for subproduct in order.subproducts:
TypeError: 'NoneType' object is not iterable
It seems one of the orders return is empty.
I followed the example and am blocked by a CAPTCHA request:
import humblebundle
client = humblebundle.HumbleApi()
client.login("_", "_*_")
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/site-packages/humblebundle/decorators.py", line 20, in wrap
result = func(_args, **kwargs)
File "/usr/lib/python3.5/site-packages/humblebundle/client.py", line 115, in login
return handlers.login_handler(self, response)
File "/usr/lib/python3.5/site-packages/humblebundle/handlers.py", line 76, in login_handler
captcha_required=captcha_required, authy_required=authy_required)
humblebundle.exceptions.HumbleCaptchaException: Please answer the CAPTCHA
I'm not sure how to get past this error... Any suggestions?
When trying to run https://github.com/ajs124/hib-dl-all (which uses this library), I get the following error message:
Traceback (most recent call last):
File "./hib-dl-all.py", line 31, in <module>
client.login(args.username, args.password)
File "/usr/local/lib/python3.4/dist-packages/humblebundle-0.1.1-py3.4.egg/humblebundle/decorators.py", line 20, in wrap
File "/usr/local/lib/python3.4/dist-packages/humblebundle-0.1.1-py3.4.egg/humblebundle/client.py", line 115, in login
File "/usr/local/lib/python3.4/dist-packages/humblebundle-0.1.1-py3.4.egg/humblebundle/handlers.py", line 76, in login_handler
File "/usr/local/lib/python3.4/dist-packages/humblebundle-0.1.1-py3.4.egg/humblebundle/exceptions.py", line 41, in __init__
File "/usr/local/lib/python3.4/dist-packages/humblebundle-0.1.1-py3.4.egg/humblebundle/exceptions.py", line 30, in __init__
TypeError: HumbleCaptchaException does not take keyword arguments
Now I do suspect that this happens because the Humblebundle API asks for a Captcha and the Script doesn't provide one. But the exact error message leads me to believe there might be a bug in the code that causes it to throw the TypeError
instead of just a HumbleCaptchaException
.
Examples.py prints nothing even though i have plenty of items in my library.
I entered my credentials correctly (wrong credentials give me an error message)
Just wanted to try out if the end point is still available. Looks like it isn't.
I get the following error message:
Traceback (most recent call last):
File "examples.py", line 14, in <module>
order_list = client.search_store("outlast")
File "/Users/Sven/Desktop/humblebundle-python/humblebundle/decorators.py", line 20, in wrap
result = func(*args, **kwargs)
File "/Users/Sven/Desktop/humblebundle-python/humblebundle/client.py", line 239, in search_store
return handlers.store_products_handler(self, response)
File "/Users/Sven/Desktop/humblebundle-python/humblebundle/handlers.py", line 169, in store_products_handler
data = parse_data(response)
File "/Users/Sven/Desktop/humblebundle-python/humblebundle/handlers.py", line 23, in parse_data
raise HumbleParseException("Invalid JSON: %s", str(e), request=response.request, response=response)
humblebundle.exceptions.HumbleParseException: [Errno Invalid JSON: %s] Extra data: line 1 column 5 - line 5 column 4 (char 4 - 52)
Even basic usage doesn't work at all.
import humblebundle
client = humblebundle.HumbleApi()
client.search_store("ftl")
raises me an HumbleParseException:
Traceback (most recent call last):
File "Home.py", line 5, in
client.search_store("ftl")
File "/anaconda3/lib/python3.7/site-packages/humblebundle/decorators.py", line 20, in wrap
result = func(*args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/humblebundle/client.py", line 239, in search_store
return handlers.store_products_handler(self, response)
File "/anaconda3/lib/python3.7/site-packages/humblebundle/handlers.py", line 169, in store_products_handler
data = parse_data(response)
File "/anaconda3/lib/python3.7/site-packages/humblebundle/handlers.py", line 23, in parse_data
raise HumbleParseException("Invalid JSON: %s", str(e), request=response.request, response=response)
humblebundle.exceptions.HumbleParseException: [Errno Invalid JSON: %s] Extra data: line 1 column 5 (char 4)
Is the library deprecated?
It now returns an array like
[
{'gamekey': '<key>'}
...
]
pretty printed and all
Reported downstream at yamatt#1
Hi
I have a "wrong password" error. My hib password contains & and -, are you sure your package correctly handles it ?
After substituting some real credentials, with a clone of the repo (thus current master):
$ python examples.py
Traceback (most recent call last):
File "examples.py", line 21, in <module>
order.ensure_subproducts()
AttributeError: 'Order' object has no attribute 'ensure_subproducts'
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.