urllib2ã¢ã¸ã¥ã¼ã«ã§Cookieã使ã£ãWebã¸ã®ã¢ã¯ã»ã¹ã¯ä»¥ä¸ã®ããã«è¡ãã¾ãã import urllib2, cookielib cj = cookielib.CookieJar() # Cookieãæ ¼ç´ãããªãã¸ã§ã¯ã cjhdr = urllib2.HTTPCookieProcessor(cj) # Cookie管çãè¡ããªãã¸ã§ã¯ã opener = urllib2.build_opener(cjhdr) # OpenDirectorãªãã¸ã§ã¯ããè¿ã r = opener.open(url) urllib2.build_opener( )ã¯urllib2.BaseHandlerã¯ã©ã¹ã¾ãã¯ãã®ãµãã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ï¼ãã³ãã©ãªãã¸ã§ã¯ãï¼ãå¼æ°ã«åãã¾ããOpenDirectorãªãã¸ã§ã¯ãã¯è¤æ°ã®ãã³ãã©ãçµç±ãã¦ãªã¯ã¨ã¹ãã®éä¿¡åã³ã¬ã¹ãã³ã¹ã®åä¿¡ãè¡ãã¾ãã
{{#tags}}- {{label}}
{{/tags}}