Git Product home page Git Product logo

humblebundle-python's People

Contributors

saik0 avatar yamatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

humblebundle-python's Issues

How to implement Captchas

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?

Invalid JSON error when logging in

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)

examples.py broken: NoneType is not iterable

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.

Blocked by Please answer the CAPTCHA

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?

TypeError: HumbleCaptchaException does not take keyword arguments

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.

empty library

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)

Making a simple call to `search_store` fails.

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)

Is the libary broken?

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?

Password encoding problem

Hi
I have a "wrong password" error. My hib password contains & and -, are you sure your package correctly handles it ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.