Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62312

Re: Use of urllib (update)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin2!goblin.stu.neva.ru!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'jeff': 0.04; 'assuming': 0.09; 'logic': 0.09; 'subject:update': 0.09; 'cc:addr:python-list': 0.11; ';o)': 0.16; 'folks,': 0.16; 'script,': 0.16; 'urllib': 0.16; '\xc2\xa0i': 0.16; "\xc2\xa0i'm": 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'trying': 0.19; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'integrate': 0.24; 'manager.': 0.24; 'script.': 0.24; 'helpful': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'points': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.31; 'easier': 0.31; 'requests': 0.31; 'larry': 0.31; 'figure': 0.32; 'up.': 0.33; 'url:python': 0.33; 'could': 0.34; 'subject: (': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'url:listinfo': 0.36; 'thanks': 0.36; "i'll": 0.36; 'url:org': 0.36; 'behind': 0.37; 'starting': 0.37; 'implement': 0.38; 'requiring': 0.38; 'little': 0.38; 'sure': 0.39; 'url:mail': 0.40; 'how': 0.40; 'company': 0.60; 'new': 0.61; 'here:': 0.62; 'back': 0.62; 'our': 0.64; 'different': 0.65; 'url:user': 0.65; 'promise': 0.68; 'stated': 0.69; 'to:addr:jeff': 0.84; 'joel': 0.91; 'url:latest': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=k20JMIbEs/ORUPAay8rT7qRKShEQ0JcOHORw1M7sfTI=; b=JAe8xCn4VHaq2KQeIkM4reCxzGglxEBqBXqgS5OYjtHp0/ktINaOb7v6GJeuWWtGRN typ293OVuzn1IjPAjtNr4KLCN4iq8a+eRFhjt3DMuNAeD7cEjoeatbyyHcxWrD5AAE7T eX1QxL7ODCtZI7Wgfxd7ogho885kA2WlctmHUSY1LJzqxcJmNimCvdPLMK/CUwA0VI3R FpqwXHzmJcaDGDkWt5BPAWMAKNZYZtE+8HX6Qa8uTgQ50Y4wTZ4Dy5M3zvW5rMsw2WuV 4zKzfvkwlMTDyU5VXN9vLHuTnzSh7lfz3YRUrkudIIpgQt7ykmNDl+n4qg3L3MMLioP6 POdw==
MIME-Version 1.0
X-Received by 10.52.165.176 with SMTP id yz16mr184992vdb.73.1387381525974; Wed, 18 Dec 2013 07:45:25 -0800 (PST)
In-Reply-To <CA+pMb3vX_RydvdiNuP653JGvw7HCGWkHqb4_UXw=SJe3PW2U_g@mail.gmail.com>
References <CA+pMb3vX_RydvdiNuP653JGvw7HCGWkHqb4_UXw=SJe3PW2U_g@mail.gmail.com>
Date Wed, 18 Dec 2013 10:45:25 -0500
Subject Re: Use of urllib (update)
From Joel Goldstick <joel.goldstick@gmail.com>
To Jeff James <jeff@jeffljames.com>
Content-Type multipart/alternative; boundary=001a11c2c0d606141804edd0ef74
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4361.1387381963.18130.python-list@python.org> (permalink)
Lines 76
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1387381963 news.xs4all.nl 2933 [2001:888:2000:d::a6]:44101
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:62312

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, Dec 18, 2013 at 10:16 AM, Jeff James <jeff@jeffljames.com> wrote:

> Folks, I promise I'll get to the point where my questions aren't so basic,
> but I'm just now starting to get into Python.   So I'm using the urllib
> script to check to make sure our company sites are up.  As stated earlier,
> I have three sites which require some form of authentication in order to
> report back through the script that they are up and accessible.    I was
> given this very helpful link by Larry covering some authentication code I
> could implement into the script.
> http://docs.python.org/2.7/howto/urllib2.html#id6 .    I can make out the
> logic behind the script, but because I'm still new to Python, I'm having a
> hard time trying to figure out how to implement it into my existing urllib
> script.  I'm assuming I need to integrate the code somehow for each url
> requiring authentication in that each site requires different creds.......
>  Other than this little speedbump this script is pretty slick and has
> already scored a few points with my manager.  ;o)     Thanks
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>
You might also want to check here:
http://www.python-requests.org/en/latest/user/authentication/

The requests module might be easier to understand.

-- 
Joel Goldstick
http://joelgoldstick.com

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Use of urllib (update) Joel Goldstick <joel.goldstick@gmail.com> - 2013-12-18 10:45 -0500

csiph-web