Problems with Json, Yobit API not working #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Code:
from YoBit import YoBit
login = YoBit(api_key='xxxxx', api_secret='xxxxx')
login.get_info()
Response:
PublicAPI & TradeAPI
Traceback (most recent call last):
File "C:/Users/Padalecki/AppData/Local/Programs/Python/Python36-32/venv/111.py", line 3, in
info = login.ticker('pac_rur')
File "C:\Users\Padalecki\AppData\Local\Programs\Python\Python36-32\lib\site-packages\YoBit_init_.py", line 121, in ticker
return self._api_query_public('ticker', pair)
File "C:\Users\Padalecki\AppData\Local\Programs\Python\Python36-32\lib\site-packages\YoBit_init.py", line 67, in _api_query_public
return requests.get(request_url).json()
File "C:\Users\Padalecki\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\models.py", line 866, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\Padalecki\AppData\Local\Programs\Python\Python36-32\lib\json_init.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\Padalecki\AppData\Local\Programs\Python\Python36-32\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\Padalecki\AppData\Local\Programs\Python\Python36-32\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Process finished with exit code 1
ADDON:
I think it is about cloudflare protection added recently
So it is cloudflare problem ou YoBit, i will try to integtate cfscrape for now...
But module needs to be updated for clouflare bypassing
ADDON:
So after cfscrape all works fine, please add clouflare bypass, thakyou))