0

我有一个 Django 项目,我正在尝试获取请求并从中获取数据。

当我做:

request_text = 'http://asdfasdf.mx/api/rol/?blabla=2'
r = requests.get(request_text)
dict = json.loads(r.text)

我得到了An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.错误。

但是,如果我通过 Web 浏览器访问请求,我可以毫无问题地看到结果。我已经将此代码与许多其他请求一起使用,直到今天我才看到此错误。

4

0 回答 0