v!leetcode is broken
jtbx opened this issue · comments
Describe the bug
When v!leetcode is run, this error is given:
0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://leetcode.com/api/problems/all/')
To Reproduce
Steps to reproduce the behavior:
- Run
v!leetcode gen
orv!leetcode info
Expected behavior
I have no idea, since I haven't used the command before
maybe something to do with user agent or required authentication?
checked the api and it seems that leetcode gave wrong mimetype
Traceback (most recent call last):
File "/usr/lib/python3.10/asyncio/__main__.py", line 58, in runcode
return future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "<console>", line 4, in <module>
File "/usr/local/lib/python3.10/dist-packages/aiohttp/client_reqrep.py", line 1104, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://leetcode.com/api/problems/all/')
resolves with pr #183