请求。仅来自原子的阻塞
我正在为其他软件中的外部Python脚本编写一个带有Communcitaion的Django应用程序。当我目前正在检查所有BASI要求及其功能时,我正在使用标准Django SQL Lite Testserver。
在测试时,我面临着一个怪异的防火墙/站点阻塞问题。
一个简单的request.get()从Windows CMD中运行良好,收到了我的JSON响应。 从我公司网络中的任何计算机中打开任何浏览器中的页面也可以正常运行。
但是,当简单地在本地主机PC上启动ATOM的请求时,它会因未分类而在403 -revys.content.decode()上失败。相关目的”。
因为这仅是从原子内发生的 - 有什么想法如何防止这种情况?
到目前为止,我尝试的是:
- 添加标头(不更改)
- 使用命令启动子过程呼叫CMD(有效,但失败了脚本的目的) 目标是简单地从一个视图中检索JSON响应,以便我可以将信息传输到我的程序。
非常感谢
:这取决于原子。如预期的那样,在日食和视觉工作室工作。当时我的解决方案是使用Eclipse,但是将其内部运行在Atom中非常好,因为这或多或少是在其他程序中使用Python API的脚本集合。
托马斯
I am writing a django app with communcitaion to external python scripts in other software. As I am currently checking all basi requirements and their functionality, I am working with the standard django sql lite testserver.
While testing, I am facing a weird firewall/ site blocking issue.
A simple request.get() is working fine from windows cmd, receiving my json response.
Opening the page in any browser from any computer within my company network works as well.
However, when simply launching the request from atom on the local host pc, it fails with 403 - response.content.decode() showing the site is receiving a prompt due to being uncategorized and I would have to click to "continue browsing for work related purposes".
As this is only happening from within atom - any ideas how to prevent this?
What I tried so far:
- Adding headers (not change)
- launching a subprocess calling cmd with the command (works, but sort of failing the purpose of the script)
Goal is to simply retrieve a json response from a view so I can transfer the information to my program.
Thanks a lot
Update: this is down to atom. Working in eclipse and Visual Studio as expected. My solution for now is using Eclipse then, but it would be great to get it working inside atom, as this is more or less a collection of scripts working inside other programms python APIs.
Thomas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论