开发者

how to write an artificial request

开发者 https://www.devze.com 2022-12-25 06:48 出处:网络
how can i construct a artificial request to login to twitter or any site for that matter that accpets post forms.

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

精彩评论

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