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


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)
				#print downloadLink
 
				# I authenticate again because it was losing authentication when trying to download from the different link(?)
				password_mgr = HTTPPasswordMgrWithDefaultRealm()
				password_mgr.add_password(None, "http://boost4-downloads.members.easynews.com/news/", easyNewsUsername,easyNewsPassword)
				handler = HTTPBasicAuthHandler(password_mgr)
				opener = build_opener(handler)

src/c/m/cmislib-0.3/src/cmislib/net.py   cmislib(Download)
'''
 
from urllib import urlencode
from urllib2 import HTTPBasicAuthHandler, \
                    HTTPPasswordMgrWithDefaultRealm, \
                    HTTPRedirectHandler, \
                    HTTPDefaultErrorHandler, \
        request.add_header('User-Agent', self.user_agent)
 
        # create a password manager
        passwordManager = HTTPPasswordMgrWithDefaultRealm()
        passwordManager.add_password(None, url, username, password)
 
        opener = build_opener(SmartRedirectHandler(),
        request.add_header('User-Agent', self.user_agent)
 
        # create a password manager
        passwordManager = HTTPPasswordMgrWithDefaultRealm()
        passwordManager.add_password(None, url, username, password)
 
        opener = build_opener(SmartRedirectHandler(),
        # add a user-agent
        request.add_header('User-Agent', self.user_agent)
        # create a password manager
        passwordManager = HTTPPasswordMgrWithDefaultRealm()
        passwordManager.add_password(None, url, username, password)
 
        opener = build_opener(SmartRedirectHandler(),
        request.add_header('User-Agent', self.user_agent)
 
        # create a password manager
        passwordManager = HTTPPasswordMgrWithDefaultRealm()
        passwordManager.add_password(None, url, username, password)
 
        opener = build_opener(SmartRedirectHandler(),

src/r/s/rsl-0.2.1/src/rsl/misc/http.py   rsl(Download)
import md5
 
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
class AskPasswordHandler(HTTPPasswordMgrWithDefaultRealm):
    '''
    urllib2 password handler, which asks user on command line to 
    provide username and password.
    '''
 
    def find_user_password(self, realm, authuri):

src/s/q/sqmediumlite-1.7.1/_sqmediumlite/optional/urls.py   sqmediumlite(Download)
 
import sys
if sys.version_info < (3,):
    from urllib2 import \
            HTTPBasicAuthHandler, HTTPHandler, \
            HTTPPasswordMgrWithDefaultRealm, ProxyBasicAuthHandler, \
            ProxyHandler, Request, build_opener

src/p/y/pyMessaging-0.3-r4247/pymessaging/zwitschr.py   pyMessaging(Download)
import unittest
import urllib
from urllib2 import build_opener, install_opener, urlopen
from urllib2 import Request, HTTPBasicAuthHandler, HTTPPasswordMgrWithDefaultRealm
 
 
# next functions are based on http://snipplr.com/view/7604/python-make-url-address-to-tinyurl/
    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/o/w/OWSLib-0.3.1/owslib/wms.py   OWSLib(Download)
import cgi
from urllib import urlencode
from urllib2 import urlopen
from urllib2 import HTTPPasswordMgrWithDefaultRealm
from urllib2 import HTTPBasicAuthHandler
from urllib2 import build_opener
from urllib2 import install_opener
            # Provide login information in order to use the WMS server
            # Create an OpenerDirector with support for Basic HTTP 
            # Authentication...
            passman = HTTPPasswordMgrWithDefaultRealm()
            passman.add_password(None, self.url, self.username, self.password)
            auth_handler = HTTPBasicAuthHandler(passman)
            opener = build_opener(auth_handler)
            # Provide login information in order to use the WMS server
            # Create an OpenerDirector with support for Basic HTTP 
            # Authentication...
            passman = HTTPPasswordMgrWithDefaultRealm()
            passman.add_password(None, self.url, self.username, self.password)
            auth_handler = HTTPBasicAuthHandler(passman)
            opener = build_opener(auth_handler)

src/o/n/ontopy-HEAD/sparql.py   ontopy(Download)
from copy import deepcopy
from functools import update_wrapper
from urllib import urlencode
from urllib2 import build_opener, HTTPBasicAuthHandler, \
    HTTPError, HTTPPasswordMgrWithDefaultRealm, urlopen
from xml.etree.cElementTree import dump, parse
 
        """
        self.base_url = base_url
        if username and password:
            pm = HTTPPasswordMgrWithDefaultRealm()
            pm.add_password(None, base_url, username, password)
            handler = HTTPBasicAuthHandler(pm)
            self.open = build_opener(handler).open

src/o/n/ontopy-0.1.1/sparql.py   ontopy(Download)
from copy import deepcopy
from functools import update_wrapper
from urllib import urlencode
from urllib2 import build_opener, HTTPBasicAuthHandler, \
    HTTPError, HTTPPasswordMgrWithDefaultRealm, urlopen
from xml.etree.cElementTree import dump, parse
 
        """
        self.base_url = base_url
        if username and password:
            pm = HTTPPasswordMgrWithDefaultRealm()
            pm.add_password(None, base_url, username, password)
            handler = HTTPBasicAuthHandler(pm)
            self.open = build_opener(handler).open

src/t/r/TracAccountManager-0.2.1dev-r4679/acct_mgr/http.py   TracAccountManager(Download)
#
# Author: Matthew Good <trac@matt-good.net>
 
from urllib2 import build_opener, HTTPBasicAuthHandler, \
                    HTTPDigestAuthHandler, HTTPPasswordMgrWithDefaultRealm
 
from trac.core import *
    def check_password(self, user, password):
        mgr = HTTPPasswordMgrWithDefaultRealm()
        mgr.add_password(None, self.auth_url, user, password)
        try:
            build_opener(HTTPBasicAuthHandler(mgr),
                         HTTPDigestAuthHandler(mgr)).open(self.auth_url)
        except IOError: