简体   繁体   English

Python-从Web服务器检索数据

[英]Python - Retrieving data from web server

I am making a program where I need to get information from a web server (I'm using Django) and then I'd send data back to the server. 我正在编写一个程序,需要从Web服务器获取信息(我正在使用Django),然后将数据发送回服务器。

The thing is I can only find ways to get information from the html page of the url I requested. 问题是我只能找到从我请求的url的html页面获取信息的方法。

How could I use a Python script to get data from the web server? 如何使用Python脚本从Web服务器获取数据? (like making a Django db query but outside Django, using only Python) I want to be able to get the information stored in Django without having to go directly to the website (that is, using a Python script). (例如,仅使用Python进行Django数据库查询,但在Django外部进行查询)我希望能够获取存储在Django中的信息,而不必直接访问网站(即使用Python脚本)。

Thanks in advance, 提前致谢,

I guess you'll want to use a REST framework. 我猜您将要使用REST框架。 The most used are django-rest-framework and tastypie 最常用的是Django-rest-frameworktastypie

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM