• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(389)  |  Call(379)  |  Derive(0)  |  Import(10)
No Document.

        def install_opener(opener):
    global _opener
    _opener = opener
        


src/e/a/easynewsgrabber-HEAD/showDownloader.py   easynewsgrabber(Download)
		if row == 0:
			print 'I didnt find the following show: ', link.string, ' - I will download it now'
 
			from urllib2 import (HTTPPasswordMgrWithDefaultRealm, HTTPBasicAuthHandler, build_opener, install_opener, HTTPError, Request, urlopen, URLError )
			password_mgr = HTTPPasswordMgrWithDefaultRealm()
			password_mgr.add_password(None, "http://members.easynews.com/global4/search.html", easyNewsUsername,easyNewsPassword)
			handler = HTTPBasicAuthHandler(password_mgr)
			opener = build_opener(handler)
			install_opener(opener)
				password_mgr.add_password(None, "http://boost4-downloads.members.easynews.com/news/", easyNewsUsername,easyNewsPassword)
				handler = HTTPBasicAuthHandler(password_mgr)
				opener = build_opener(handler)
				install_opener(opener)
				f = urlopen(downloadLink)
				print "downloading " + downloadLink
				#print f

src/p/y/py-smsgv-HEAD/smsgv.py   py-smsgv(Download)
    def login                   (self, password):
        """Logs into the Google Account system and receives the cookies into a
        file to allow continued use of the Google Voice system."""
        if not self.logged_in:# We don't need to repeat this process over and over
            from urllib2 import HTTPCookieProcessor, build_opener, install_opener, Request, urlopen
            opener = build_opener(HTTPCookieProcessor(self.cookies))
            install_opener(opener) # Let Google know we'll accept its nomtastic cookies

src/r/s/rsl-0.2.1/src/rsl/misc/http.py   rsl(Download)
from urllib2 import Request as Urllib2Request
from urllib2 import HTTPPasswordMgrWithDefaultRealm, BaseHandler
from urllib2 import HTTPCookieProcessor
from urllib2 import HTTPBasicAuthHandler, build_opener, install_opener
from cookielib import LWPCookieJar
from httplib import HTTPMessage
from StringIO import StringIO
        auth_handler = HTTPBasicAuthHandler(AskPasswordHandler())
        auth_handler.add_password('realm', 'host', 'username', 'password')
        OPENER = build_opener(cache_handler, cookie_handler, auth_handler)
    install_opener(OPENER)
    return OPENER
 
def deinstallopener():
    '''
    uninstall caching urllib2 opener.
    '''
    global OPENER, COOKIEJAR
    if OPENER:
        install_opener(None)

src/e/n/ensemblerewards-HEAD/trunk/python/mailinglist.py   ensemblerewards(Download)
import re
from datetime import datetime
from urllib import urlencode
from urllib2 import urlopen, build_opener, install_opener,\
     Request, HTTPCookieProcessor
from BeautifulSoup import BeautifulSoup, SoupStrainer
 
    def __init__(self, list_id):
        self.list_id = list_id
        # Install a cookie jar to handle cookie-based logins.
        self._cookie_jar = cookielib.CookieJar()
        install_opener(build_opener(HTTPCookieProcessor(self._cookie_jar)))
 
    def login(self, email, password):

src/e/n/ensemblerewards-HEAD/python/mailinglist.py   ensemblerewards(Download)
import re
from datetime import datetime
from urllib import urlencode
from urllib2 import urlopen, build_opener, install_opener,\
     Request, HTTPCookieProcessor
from BeautifulSoup import BeautifulSoup, SoupStrainer
 
    def __init__(self, list_id):
        self.list_id = list_id
        # Install a cookie jar to handle cookie-based logins.
        self._cookie_jar = cookielib.CookieJar()
        install_opener(build_opener(HTTPCookieProcessor(self._cookie_jar)))
 
    def login(self, email, password):

src/p/y/pyMessaging-0.3-r4247/pymessaging/zwitschr.py   pyMessaging(Download)
import time
import unittest
import urllib
from urllib2 import build_opener, install_opener, urlopen
from urllib2 import Request, HTTPBasicAuthHandler, HTTPPasswordMgrWithDefaultRealm
 
 
    def send_twitter(self, message):
        """Actually sends a message to Twitter/zwitschr"""
        req = Request('http://zwitschr.hudora.biz/api/statuses/update.json')
        twit_auth = HTTPPasswordMgrWithDefaultRealm()
        twit_auth.add_password(None, 'zwitschr.hudora.biz', self.__username, self.__password)
        # install the auth handler built from the HTTPPasswordMgrWithDefaultRealm password manager
        install_opener(build_opener(HTTPBasicAuthHandler(twit_auth)))

src/p/y/pywilima-0.2/lib/pywilima.py   pywilima(Download)
import sys, logging, time
 
from urllib2 import urlopen, HTTPError, HTTPCookieProcessor, install_opener, build_opener
from cookielib import CookieJar
from ClientForm import ParseResponse
from BeautifulSoup import BeautifulSoup
 
def install_cookieopener():
   # Install opener that handles cookies
   cj = CookieJar()
   processor = HTTPCookieProcessor(cj)
   install_opener(build_opener(processor))
 
 

src/a/g/agtl-0.7.1.0-freerunner0/advancedcaching/downloader.py   agtl(Download)
        from cookielib import LWPCookieJar
        cj = LWPCookieJar(self.cookiefile)
        if not self.opener_installed:
            from urllib2 import build_opener, install_opener, HTTPCookieProcessor
            opener = build_opener(HTTPCookieProcessor(cj))
            install_opener(opener)
            self.opener_installed = True

src/p/v/PVoice-HEAD/pygooglevoice/googlevoice/util.py   PVoice(Download)
from datetime import datetime
from pprint import pprint
try:
    from urllib2 import build_opener,install_opener, \
        HTTPCookieProcessor,Request,urlopen
    from urllib import urlencode,quote
except ImportError:

src/o/w/OWSLib-0.3.1/owslib/wms.py   OWSLib(Download)
from urllib2 import HTTPPasswordMgrWithDefaultRealm
from urllib2 import HTTPBasicAuthHandler
from urllib2 import build_opener
from urllib2 import install_opener
 
from etree import etree