2011.11.26

제주도 마지막 날...
마라도의 풍경입니다. 즐감하시길 ~


가파도 마라도로 가는 배 티켓을 파는 곳입니다.


제가 승선했던 배.. -ㅅ-;;


마라도 도착했을때 전경


마라도에 도착해서 저희를 맞이해 주는 강쥐 ^-^;


새우깡을 좋아합니다. ㅋ



이름 모를 생선.. 누군가에게..회칼침을 당한듯.. =ㅂ=;;



마라도의 따뜻한 겨울


마라도에 유명한 자장면..


제 개인적으로 자장면 보다 맛있던 호떡 :-)


하나밖에 없는 분교 교장 ^^~


멀리서 물고기 잡는 어선들~


정체 모를 묘?


이쁜 등대


모두 기억속에.. 사진속에 남아 절 기쁘게 해주는.. 사진들입니다.

One Shot! One Day..
Posted by bitfox
l
2011.11.25

제주도 한라산에서 내려오는 길에 "관음사"로 내려오는 코스가 있습니다.
불교의 웅장함과 고결함을 담고 싶었습니다.


경건한 마음으로.. One Shot! One Day~
Posted by bitfox
l

If you want to keep the authentication you need to reuse the cookie. I'm not sure if urllib2 is available in python 2.3.4 but here is an example on how to do it:

req1 = urllib2.Request(url1) 
response
= urllib2.urlopen(req1) 
cookie
= response.headers.get('Set-Cookie') 
 
# Use the cookie is subsequent requests 
req2
= urllib2.Request(url2) 
req2
.add_header('cookie', cookie) 
response
= urllib2.urlopen(req2) 

 

-------------------------------------------------------------------------

If this is cookie based authentication use HTTPCookieProcessor:

import cookielib, urllib2 
cj
= cookielib.CookieJar() 
opener
= urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) 
r
= opener.open("http://example.com/") 

If this is HTTP authentication use basic or digest AuthHandler:

import urllib2 
# Create an OpenerDirector with support for Basic HTTP Authentication... 
auth_handler
= urllib2.HTTPBasicAuthHandler() 
auth_handler
.add_password(realm='PDQ Application', 
                          uri
='https://mahler:8092/site-updates.py', 
                          user
='klem', 
                          passwd
='kadidd!ehopper') 
opener
= urllib2.build_opener(auth_handler) 
# ...and install it globally so it can be used with urlopen. 
urllib2
.install_opener(opener) 
urllib2
.urlopen('http://www.example.com/login.html') 

... and use same opener for every request.



[출처] http://stackoverflow.com/questions/923296/keeping-a-session-in-python-while-making-http-requests

'Hello_World! > 애플추가_파이썬' 카테고리의 다른 글

Python threads - a first example  (0) 2011.12.22
KillApachePy  (0) 2011.11.30
파이썬 v2.7.2 - email: Examples  (0) 2011.10.05
Python - Sending Email using SMTP  (0) 2011.10.05
Gmail의 SMTP를 이용한 메일 발송  (0) 2011.10.05
Posted by bitfox
l