开发者

Connect to a website using Python

Let's say I want to connect an app I created to a web开发者_Python百科site (SSL) to get values from the content at a certain page. How can I do it?


httplib2 if you wanna make https call. Check out the doc for more info.

--Sai


If you need something more complex you could use mechanize, which is a Python library that simulates a browser. So you can interact with the page just like with a normal browser (in case there's no simple direct URL you could retrieve).


Or you can use urllib2 which also supports HTTPS connections (if your python installation supports SSL). And BeautifulSoup library (http://www.crummy.com/software/BeautifulSoup/) for parsing content of web pages.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜