第5讲

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    第5讲 - Presentation Transcript

    1. 5 qingfeng@me.com 2009-09-26 2009 9 25
    2. Python & Network ✤ ✤ , ✤ 2009 9 25
    3. twill ✤ http://twill.idyll.org/ ✤ python setup.py install ✤ twill-sh 2009 9 25
    4. twill go http://www.renren.com/SysHome.do showforms fv 1 email qingfeng@me.com fv 1 password xxx submit show 2009 9 25
    5. twill go http://upload.renren.com/addphotoPlain.do? id=327316943 showforms formfile 3 photo1 /Users/fengqing/Downloads/p1.jpg submit 2009 9 25
    6. Python Network Library ✤ urllib ✤ httplib ✤ urllib2 ✤ cookiejar 2009 9 25
    7. urllib.urlopen(“http://www.sina.com.cn”).read() 2009 9 25
    8. f = open(“c:/sina.html”,”w”) html = urllib.urlopen(“http://www.sina.com.cn”).read() f.write(html) f.close() 2009 9 25
    9. cookiejar = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar)) params = {'email':'qingfeng@me.com','password':'xxx','origURL':"http:// www.renren.com/SysHome.do"} data = urllib.urlencode(params) fobj = opener.open('http://passport.renren.com/PLogin.do', data) fobj = opener.open('http://renren.com/profile.do?id=260622588') print fobj.read() 2009 9 25
    10. HTTP ✤ GET ✤ POST ✤ HEAD ✤ PUT/DELETE 2009 9 25
    11. GET ✤ telnet www.renren.com 80 ✤ GET / HTTP/1.0 2009 9 25
    12. Cookie ✤ ✤ Cookie ✤ Cookie & 2009 9 25
    13. Try ✤ , ✤ SQL ✤ WebGame 2009 9 25
    14. Free Time ✤ , , ✤ ✤ ✤ ✤ / ✤ 2009 9 25
    SlideShare Zeitgeist 2009

    + Qing FengQing Feng Nominate

    custom

    295 views, 1 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 295
      • 295 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 5
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?