开发者

how to write an artificial request

how can i construct a artificial request to login to twitter or any site for that matter that accpets post forms. what i've been trying is to extract the headers and post request parameters from the origional request(directed at the action atribute of the form) and copy it to the outgoing url object that i am making.but it just won't work.

And i am aware of the apis and i don't wanna use them i a开发者_运维知识库m trying this to write a web proxy site.


I don't fully understand your question (e.g. "aware of the APIs and I don't want to use them") but urlib may be useful, particularly urllib.FancyURLopener(...).


Are you looking for libcurl ?

It's a library that allows you to interact with servers using a bunch of different protocoles, including HTTP. So, for instance, you can simulate POST or GET request.

You can use it as a command line tool or as a library from many languages (PHP, C, etc ...)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜