From e9f833d7f3f941d61ff6a50dbc361a88d94eb4e9 Mon Sep 17 00:00:00 2001 From: JamesonHuang <462430725@qq.com> Date: Wed, 17 Jun 2015 22:58:49 +0800 Subject: [PATCH] protocol demo about cache --- 1_7.http_proxy_server/curl-test/part1 | Bin 0 -> 20001 bytes .../python/testCode/cache/backup | 7438 +++++++++++++++++ .../python/testCode/cache/www.sina.com.cn | 7438 +++++++++++++++++ .../python/testCode/cacheUtil.py | 30 + 1_7.http_proxy_server/python/testCode/py.txt | 10 + 1_7.http_proxy_server/python/testCode/res.png | Bin 0 -> 14175 bytes .../python/testCode/test.html | 23 + .../python/testCode/test1.png | Bin 0 -> 7001 bytes .../python/testCode/test2.png | Bin 0 -> 7174 bytes .../python/testCode/testFileIO.py | 24 + .../python/testCode/testUrllib.py | 75 + 1_7.http_proxy_server/python/testCode/url2.py | 16 + 12 files changed, 15054 insertions(+) create mode 100644 1_7.http_proxy_server/curl-test/part1 create mode 100644 1_7.http_proxy_server/python/testCode/cache/backup create mode 100644 1_7.http_proxy_server/python/testCode/cache/www.sina.com.cn create mode 100644 1_7.http_proxy_server/python/testCode/cacheUtil.py create mode 100644 1_7.http_proxy_server/python/testCode/py.txt create mode 100644 1_7.http_proxy_server/python/testCode/res.png create mode 100644 1_7.http_proxy_server/python/testCode/test.html create mode 100644 1_7.http_proxy_server/python/testCode/test1.png create mode 100644 1_7.http_proxy_server/python/testCode/test2.png create mode 100644 1_7.http_proxy_server/python/testCode/testFileIO.py create mode 100644 1_7.http_proxy_server/python/testCode/testUrllib.py create mode 100644 1_7.http_proxy_server/python/testCode/url2.py diff --git a/1_7.http_proxy_server/curl-test/part1 b/1_7.http_proxy_server/curl-test/part1 new file mode 100644 index 0000000000000000000000000000000000000000..feb0eb85bda75fc968b9e8c62705b255324a6804 GIT binary patch literal 20001 zcmdqJWk4L?mhK&a1b25ra0~7bAh=7Qk>IYu9fCt}cL)x_-KBBp0KwfMxI^R3+a&*U z#?IV1_s*U7!{rOm)lJo2d)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hT1{m0^6$%)Z+UUAYElx}|@UyVVPYGF#rWmMZ{r zdid*IqzzwYN+VfgA_drsDt5}gUKu;S!1`*RzFdVOESx>-!30a0qMV?o#5F|Am!^Jv80NeB0UZQMe_g~wn`&6E6)S3U4javVI&qmGj+eRIje70zOt3iBo z^XET&bjTeV#QuK)$N@M0EylDbV)9?CU@^7+5(Ehr;iCWd$3r$}T&_?c>BtD9_pQ+9 zkY{N6?<_nd%;zRyclauV1O{T!(lt1E>KdE#{&Pt$0~!no0)I>6mmE*%rV4-mND^d) zf1;J0wW@KSvg9Y+&B%wWI1d*Nti`LncB%x6GR}t7LiRcJ>?2>5>9?}@y&~?;HLwBG zZBIq~tlJl`W&JV)2Lxd0x^1eZ*1Ny#s+IodQE{rRy+eaTRa<+$UShOIReV+gQdc;d*Ogyd_-o|VWqGHOYA%aC>(-`{_`B8z`qgxOX zG#}fJ--h(zVV&RYKKmH|dkf<5!_rU$hb_aead}8N@olx&`e)Q_c0T*>Xv~>93FF6) zXP7JfnjA4Rv^+~}n;}{wKSQwPD8G6pKVhHFjUvS&wmlJ(|6&D;G4+=qNU-P-EG-5^ zsVdo$E{%=e8B|{*X=wWV&Xi-YdH+cyrDsD{E{8NP9oNqv!;0V;=+oBOpoYQDr6=3- zL%9dahu$vyw2{(dVQuFduKjA8Uipqa&BCsQ^)R@h(q)g5aWjLl HE9NW`r2>b4 literal 0 HcmV?d00001 diff --git a/1_7.http_proxy_server/python/testCode/cache/backup b/1_7.http_proxy_server/python/testCode/cache/backup new file mode 100644 index 0000000..e0fd615 --- /dev/null +++ b/1_7.http_proxy_server/python/testCode/cache/backup @@ -0,0 +1,7438 @@ + + + + + + + + + 新浪首页 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +跳过导航栏 + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + + + + +
+ + +
+ + + +
+ + + + + +
+ + +
+
+ +
+
+ + +
+
+ + + + + +
+
+ +
+ + + +
+ + + +
+
+ 教育 + + 热卖 + + 练字 + + 淘宝 +
+
+ + + + +
+ + +
+ + + + + + + + + + +
+
+ + + +
+
+ +
+
+
+
+ 视频 + 综艺 + 秒拍 +
+ + +
+ +换一换 + + +万能插座有隐患 + + +
+
+ + +
+ +
+ +
+ +
+ + + +
+
+ +
+ +
+
+
+ + 猜你喜欢 + + + + + + + + 热门话题 + +
+ +
+
+
+
+

+
+
+ + + +
+
+

+
+
+ +
+ + + +
+ + + + +
+ + + +
+ + +
+
+ +
+
+
+ + 新闻 + + + +图片 +专栏 + + + + +
+ +2015.6.17 + +
+
+
+ + + + + +
+ + + + + + + +
+ + +
+ +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+
+ +
+
+ +
+
+ + + +
+ +
+
+ +
+
+ +
+ +
+高清美图   + +
+ +
+
+
+ +
+
+ +
+
+
+
+
+ 汽车 + 购车 + 图赏 +
+ + + + + + + + +
+
+ + +
+
    +
  •  
  • + +
  • + + +
  • +
+
+ + + +
+
+
+
+ 1 + + 2 + + 3 + + 4 +
+
+ + + + +
+
+
+ +
+
+ + +
+ +
+
+
+
+ +
+
+ +
+ + + + +
+ +
+ + + + + +
+ + + +
+ + + +
+ +
+ + +
+ +
+ +
+
+
+ + +
    + +
+ +
    +
  • +
+ + + + +
+
+
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+ 财经 + 股票 + 理财 +
+ + + + + + + +
+
+ + + +
+
+
+ + + + + + + + +
+
+ +
+ + + + + + +
+ + +
+ +
+
+ +
+
+
+
+ 博客 + 精选 + 微博 +
+ + + + + + +
    +
  • +
+ +
+
+
+ + +
+ + + + +
+ + + + + +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + + + + +
+ + + + + + + +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+ + + + + + + +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ + + +
+ +
+
+ +
+ + + + + + +
+
+
+ +
+
+ + +
+ + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+
+
+ +
+ +
+ +
+ +
+ + + + + + + +
+ + + + +
+ + + +
+ +
+
+
+
+ 社会 + 公益 +
+
    +
  • +
+ + + + +
+
+ + +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ + + + +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ +
+
+ +
+
+ +
+ +
+
+
+ 资讯 +
+ +
    +
  • +
  • 爱问
  • +
+ + + + +
+
+
+ +
+ +
+ + + + + + + +
+ + + +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ +
+
+ +
    +
  • + + +
  • +
+ +
+ +
+
+
+ +
+
+ +
+ +
+ + + + + +
+ + + + +
+
+ + + + + + + +
+
+ +
+
+ +
+
+ + + +
+ +
+
+ +
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + +
+ + + + +
+ +
+
+
+ + +
+
+ +
+ + +
+
+ + + +
+ +
+ + + + + +
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+ +
+ + + + + +
+ + + +
+ +
+ +
+
+ +
+ + +
+ +
+ + + +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+
+ +
+ + +
+
+ + + + + +
+
+ +
+
+ +
+ + +
+ +
+ +
+
+
+ +
+ +
+ +
+ + +
+ + + +
+ + +
+ +
+
+

+ 美图 + GIF +

+
+
+
+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+
+ + + + + + + + +
+ + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1_7.http_proxy_server/python/testCode/cache/www.sina.com.cn b/1_7.http_proxy_server/python/testCode/cache/www.sina.com.cn new file mode 100644 index 0000000..af604da --- /dev/null +++ b/1_7.http_proxy_server/python/testCode/cache/www.sina.com.cn @@ -0,0 +1,7438 @@ + + + + + + + + + 新浪首页 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+
+ +
+
+ +
+
+ +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ +跳过导航栏 + + + + + + + + + + + + + + +
+ + +
+ + + +
+ + + + + +
+ + +
+ + + +
+ + + + + +
+ + +
+
+ +
+
+ + +
+
+ + + + + +
+
+ +
+ + + +
+ + + +
+
+ 教育 + + 热卖 + + 练字 + + 淘宝 +
+
+ + + + +
+ + +
+ + + + + + + + + + +
+
+ + + +
+
+ +
+
+
+
+ 视频 + 综艺 + 秒拍 +
+ + +
+ +换一换 + + +万能插座有隐患 + + +
+
+ + +
+ +
+ +
+ +
+ + + +
+
+ +
+ +
+
+
+ + 猜你喜欢 + + + + + + + + 热门话题 + +
+ +
+
+
+
+

+
+
+ + + +
+
+

+
+
+ +
+ + + +
+ + + + +
+ + + +
+ + +
+
+ +
+
+
+ + 新闻 + + + +图片 +专栏 + + + + +
+ +2015.6.17 + +
+
+
+ + + + + +
+ + + + + + + +
+ + +
+ +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + +
+ +
+ + + + + +
+ +
+
+ +
+
+ +
+
+ + + +
+ +
+
+ +
+
+ +
+ +
+高清美图   + +
+ +
+
+
+ +
+
+ +
+
+
+
+
+ 汽车 + 购车 + 图赏 +
+ + + + + + + + +
+
+ + +
+
    +
  •  
  • + +
  • + + +
  • +
+
+ + + +
+
+
+
+ 1 + + 2 + + 3 + + 4 +
+
+ + + + +
+
+
+ +
+
+ + +
+ +
+
+
+
+ +
+
+ +
+ + + + +
+ +
+ + + + + +
+ + + +
+ + + +
+ +
+ + +
+ +
+ +
+
+
+ + +
    + +
+ +
    +
  • +
+ + + + +
+
+
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+
+
+
+ 财经 + 股票 + 理财 +
+ + + + + + + +
+
+ + + +
+
+
+ + + + + + + + +
+
+ +
+ + + + + + +
+ + +
+ +
+
+ +
+
+
+
+ 博客 + 精选 + 微博 +
+ + + + + + +
    +
  • +
+ +
+
+
+ + +
+ + + + +
+ + + + + +
+ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+ +
+ + + + + +
+ + + + + + + +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+
+ +
+ + + + + + + +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ + + +
+ +
+
+ +
+ + + + + + +
+
+
+ +
+
+ + +
+ + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+
+ +
+
+ +
+
+ + +
+ +
+
+ +
+
+
+
+ +
+ +
+ +
+ +
+ + + + + + + +
+ + + + +
+ + + +
+ +
+
+
+
+ 社会 + 公益 +
+
    +
  • +
+ + + + +
+
+ + +
+ +
+ +
+
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+ + +
+
+ +
+ +
+ + + + +
+
+ +
+
+ +
+
+ + +
+ + + + + +
+ +
+
+ +
+
+ +
+ +
+
+
+ 资讯 +
+ +
    +
  • +
  • 爱问
  • +
+ + + + +
+
+
+ +
+ +
+ + + + + + + +
+ + + +
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
+ +
+
+ +
    +
  • + + +
  • +
+ +
+ +
+
+
+ +
+
+ +
+ +
+ + + + + +
+ + + + +
+
+ + + + + + + +
+
+ +
+
+ +
+
+ + + +
+ +
+
+ +
+
+
+
+ + +
+
+ + +
+
+ +
+ +
+ + + +
+ + + + +
+ +
+
+
+ + +
+
+ +
+ + +
+
+ + + +
+ +
+ + + + + +
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+ +
+ + + + + +
+ + + +
+ +
+ +
+
+ +
+ + +
+ +
+ + + +
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+ +
+
+ +
+ + +
+
+ + + + + +
+
+ +
+
+ +
+ + +
+ +
+ +
+
+
+ +
+ +
+ +
+ + +
+ + + +
+ + +
+ +
+
+

+ 美图 + GIF +

+
+
+
+ +
+
+
+ +
+ + +
+ +
+ +
+ +
+
+ + + + + + + + +
+ + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/1_7.http_proxy_server/python/testCode/cacheUtil.py b/1_7.http_proxy_server/python/testCode/cacheUtil.py new file mode 100644 index 0000000..f7fc14a --- /dev/null +++ b/1_7.http_proxy_server/python/testCode/cacheUtil.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python +# coding=utf-8 +import urllib +import urllib2 +class CacheUtils: + + def cbk(a, b, c): + '''''鍥炶皟鍑芥暟 + @a: 宸茬粡涓嬭浇鐨勬暟鎹潡 + @b: 鏁版嵁鍧楃殑澶у皬 + @c: 杩滅▼鏂囦欢鐨勫ぇ灏 + ''' + per = 100.0 * a * b / c + if per > 100: + per = 100 + print '%.2f%%' % per + + def download(self, url, local): + urllib.urlretrieve(url, local, cbk) + + def cache(self, url): + fileName = url.split('/')[-1] + req = urllib2.Request(url) + #req.add_header('Range', 'bytes=0-7000') + response = urllib2.urlopen(req) + buffer = response.read() + with open("./cache/img.png", "a+") as fp: + fp.write(buffer) + + diff --git a/1_7.http_proxy_server/python/testCode/py.txt b/1_7.http_proxy_server/python/testCode/py.txt new file mode 100644 index 0000000..d62d43a --- /dev/null +++ b/1_7.http_proxy_server/python/testCode/py.txt @@ -0,0 +1,10 @@ +test1test2test3test4test5test6test7test8test9test1 +test2 +test3 +test4 +test5 +test6 +test7 +test8 +test9 +test1test2test3test4test5test6test7test8test9 \ No newline at end of file diff --git a/1_7.http_proxy_server/python/testCode/res.png b/1_7.http_proxy_server/python/testCode/res.png new file mode 100644 index 0000000000000000000000000000000000000000..fc4efba40ab65f524112b647d42e97c48ce1afbd GIT binary patch literal 14175 zcmd73by$>L_dhBqjexW;bazM$-6`GOB_Ir;bO=L=Ln8vxEs`P)G7{3=IW$tzNS>QV zpYQMeUe|lB-}&?WGjk2>d*5rXz2fs(YwsuxHHF8RWS9>gJb0|6D69400W#>p10-a0 zRNybQy*R)>1R0fNrF6V!_dcR!5U$_ctzWveAWJ!uCKnfv6kp#uM)J2$hvL7(B*Uoc zkhh9j4`INJW^^Qc5rRsTz|8oB5KkkXmSW#QzhQ7;ac^(`W!v1+`OMO@>u%e={@pJN zSN%Jufo}7AgM9sK`3!Joko{&Rvqga1nK-zNAo_`x3u{_|~r zCHQX>{C^Yoe@*b;*85+?{lBjFUvcB)W;GS$P{IIB1skpqKp(=9B&89ro7DGrc0O$# z9GI)#xzaVu3RWct-lYs}HbDc`+G~*k)gS;#sL5lypGDJKv)s&6MOKaMypH$2CY*W< z2z)&-6akNK^Dnw_1W)es7#V2C6b(1vV&X*F+XKB7euWE>Q9H?^>^ z5LTZF>?Ab^*k_o3?4x%pR(bTC?N1nJ3-AGn!u7;ujnqdU28Y?-Ld?zq~~SAMs6_a83<4 zKJQK$NFTepyxcFyO1A|mQ$%$SjIpwEr=k9p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o(lrAu9}4B@D$5IiE)uC55494hu4> z%1czW!=)WH#q*%%ee9ZcIkG=aSjrThuNqG9s}MXlQw+%c0^?e@CH*L$r~_0YRce29 z5Jt03Tyt+9U~4{jnlIJeMW~sL{um#Hkyb*hEjdmT+>je1#eUQ|ppBZO?=~r!A%tg- z*8#m1V}ME-^@N2SV+;h_gheLRyDBmZJ*nn}=vXmWj{B-)zw0CqKd~wvj*dqFyDF z+o8(O$I)$>FZOn3Nu3pK2(y;tNCNIXQCI!BmjhhU`FrsF{w5UQ3io%S0Drgn=NeHz zGLSs(Z#@0CF@G*B{e1*@7#Q~N&8R>3lK%U(B9i<0{to{$#s9u__3tI3`%%Do(fdz4 z9Fs@)-+zby|KNtxy)=J?1CD0i|M<`QWB+?~|3%#Y+l{Wjnk(+QL*6N=S)OCEdUpQ~ NB{?鐧惧害涓涓嬶紝浣犲氨鐭ラ亾 +
+ diff --git a/1_7.http_proxy_server/python/testCode/test1.png b/1_7.http_proxy_server/python/testCode/test1.png new file mode 100644 index 0000000000000000000000000000000000000000..6163778afb4d9c12bce0d1414360b0099bbde043 GIT binary patch literal 7001 zcma)AXH-*Nv!=JuMWuv}N|PpCI!FK!MSAau)SxIxmySZ{NC#%HsVKj*BR%$_}a=9!sicI+KJ2n`i06#)SOjkcD?T>=6kFaZG} z5d|6WrM{OI_(SHhwuY*q-_%Mjc@ER!(aGY0cPo*qJ9AoD*>Kt6v1^P}$JcPicq&%P zn$Mc{v5R4ssGePRWx5|mc0QT^G6NI+og^OiRTq<{!P&W$l~s@SY1Hl{>e?aPsjq+e z-7LNz_bb?YW@T`&Uui24wG}j_|5W80Kd?Ok!PSl%f8G(qzhCsUe|}Jq|9)`+W)cvD zLVrIARAm3W(0`t1-#Q6@|2h>W_@{z1;s0I1sW8Dm6`Ts6S@3TPPK60hE%@hdXBPaM zg8!en|3ksQo%dhN{Xft9*WAP#Q~Hn_q>+H9Le1vSMG$uqs;HqKH{V{x;oe}@)@*K_ zc=5Jq$ke0-pQ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hGxqi`4?v~Is`kHZyO0@Z+g9I900 zUcQ!zx&{$lmZI1pTb;H{R_X!tFrjnw#(ayy+B^bM4s%yaqtMHJJ<16BblPDNd|tL$ zF@X{&Txu4k@C+Q)$*l}8?rZI@5tg8o80!T`+}vLuO8-{^rx=)2>LAj4}vH!Kz<85w{>& z?Ru#PaPRrS!GUgSYHB)LrccrVMdszBZk>6aCqiGc7KoUPQmle{eY5gLzUHMRvA__w zF1tFjCVrD88Yy~x!*$NoyFT(;>lbu;BtUE{)mT>M2CFy7He1F9s%4$KCSxEN*Tp9 za>l>DeOsI0UXE->JEe98=ngp{8}lQb=EN9ncx_g+EYEIRkM6Am1Gmw~Y2pxjNGtk6 zniVZ;{4*?MkGSWhO;}{YS63Ad@w?^1j%rDS2HNmJMR)U<)}=S}o`SiZK0gAJDYC(L z%gOF#)v-Uq_*F7?3vio_=mpS+%A<|e%a)%RB6mq5j@Ql3_8sg5vvZn>?(Gjh7X?2m zQ&>-BUX|<{&OQ&$AkXGhnihKitFv*WoMy3WdNkZLHn=oPmsKZb)_&1eLe{gZ%7jo` zEEf7M72Rf1WB+WSWC@DNW=440wH0X=*xAIi&Ql%9yjo!hW?ZCI++fJb z0qZqR=ldWzlP9HW!>k|kCfpz(U@Tjp0Epol0Rh3)H7*1UJOB&|{8t1#0Qqi%2WEoq z>;Dg#$M7qW|9k>`eDwyrUX6^ftMMi3Y6SHEGyS8G0DXh{YR&(M|L3Rw693000)qc7 z{;#m<&8zvpH2p{WzvBNc3uymW{A&FFFy$Yy|53sJr*Q=Tr-FYy`ET$3_2j?I{lC2X epUll~zr4OtP%%HnZY6XjqpGN(P%QT> 100: + per = 100 + print '%.2f%%' % per + +""" urllib涓嬭浇 +url = 'http://www.sina.com.cn' +#local = '/home/rh/my_code/OpenWrt_Luci_Lua/1_7.http_proxy_server/python/testCode/sina.html' +#local = '/home/rh/my_code/OpenWrt_Luci_Lua/1_7.http_proxy_server/python/testCode/test.html' +#local = './cache/backup' + +fileName = url.split('/')[-1] +local = os.path.join('./cache',fileName) + +urllib.urlretrieve(url, local, cbk) + +""" + +#url = "http://download.meizu.com/Firmware/Flyme/m1_note/4.2/cmcc/20150507154711/61746475/update.zip" +url = "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superplus/img/logo_white_ee663702.png" +req = urllib2.Request(url) +req.add_header('Range', 'bytes=0-7000') +response = urllib2.urlopen(req) +buffer = response.read() +with open("./cache/test1.png", "a+") as fp: + fp.write(buffer) + + +req = urllib2.Request(url) +req.add_header('Range', 'bytes=7001-14175') +response = urllib2.urlopen(req) +buffer = response.read() +with open("./cache/test2.png", "a+") as fp: + fp.write(buffer) + + + + + + + +""" urllib2涓嬭浇 request澶辫触 +url = 'http://www.sina.com.cn' +req = urllib2.Request(url) +#req.add_header('range','byte:1-100') +response = urllib2.urlopen(req) +file = response.read() + +with open("urllib2test.html", "a+") as fp: + fp.write(file) +""" +"""urlopener 澶辫触""" +url = 'http://www.sina.com.cn' +opener = urllib2.build_opener() +#涓嶅姞澶翠俊鎭垯鍑虹幇403閿欒鍜屼贡鐮 +opener.addheaders = [('User-agent', 'Mozilla/5.0')]; +#opener.addheaders = [('range', 'byte:1-100')] +htmlAll = opener.open( url ).read() +reg1Floor = '
(.*?)
' +#鏂囦欢淇濆瓨缂栫爜鍜屾枃浠剁紪杈戠紪鐮侀兘鏄痷tf-8锛屾墍浠ecode涓娆★紝涓嶇劧浼氬嚭鐜颁贡鐮侊紝浣嗘槸涓嶅奖鍝嶇粨鏋溿 +#htmlAll.decode('utf-8') +print(htmlAll) + + diff --git a/1_7.http_proxy_server/python/testCode/url2.py b/1_7.http_proxy_server/python/testCode/url2.py new file mode 100644 index 0000000..031609f --- /dev/null +++ b/1_7.http_proxy_server/python/testCode/url2.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# coding=utf-8 +import urllib2 +#url = "http://download.meizu.com/Firmware/Flyme/m1_note/4.2/cmcc/20150507154711/61746475/update.zip" +url = "https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superplus/img/logo_white_ee663702.png" + +#url = "http://www.sina.com.cn" +req = urllib2.Request(url) +req.add_header('Range', 'bytes=7001-14000') +response = urllib2.urlopen(req) +#print(response.info()) + +html = response.read() +with open("test4.png", "a+") as fp: + fp.write(html) +#print html