import requests b=requests.get(r"http://rzhunemogu.ru/RandJSON.aspx?CType=1").json() Why in some cases (because it gives random jokes) this code gives an error (possibly due to encodings) and how can I fix it?
import requests b=requests.get(r"http://rzhunemogu.ru/RandJSON.aspx?CType=1").json() Why in some cases (because it gives random jokes) this code gives an error (possibly due to encodings) and how can I fix it?
Source: https://ru.stackoverflow.com/questions/755281/
All Articles
{"key": "строка "с" кавычками"}. Quotation marks inside strings must be escaped by adding a backslash (``) in front of them - diraria\n- diraria\n, then json'e produces line breaks. Therefore, the code should be\\n, then json'e will be obtained\n- diraria