开发者

How to emulate a browser preferably usinng Python or a Linux tool

I have the URL / Request Header / POST contents . Is it possible for me to sent the query to the server and get the output HTML and Javascript ? Th开发者_运维技巧is is a AJAX stuff , but still I think we can emulate using HTTP .

Is there a convenient method for this using Python ? Or is there a GUI tool , that would just lee enter the all the REQUEST HEADER options and also the POST contents and get the desired output ?


On perl you have LWP::UserAgent module. Python have sth similar urllib2 (it should be in core libraries). You may also need "Beautiful Soup" for html/xml parsing.


You can use "wget" which should be available for most distros.

Read up on --post-file and --header.

http://linux.die.net/man/1/wget


In Python you also have Google's httplib2 which has a higher level interface than urllib2. For further detail see Python urllib vs httplib?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜