From 2eb08d19c58181f5d63c8e461f9f928a9f713632 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sat, 11 Oct 2003 15:59:02 +0000 Subject: [PATCH] Workaround for urllib2 not doing basic auth URLs. (This is broken because you end up with the passwords in the feeds list!) --- rawdoglib/rawdog.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rawdoglib/rawdog.py b/rawdoglib/rawdog.py index a152429..32a7e95 100644 --- a/rawdoglib/rawdog.py +++ b/rawdoglib/rawdog.py @@ -78,7 +78,14 @@ class Feed: return 0 try: - p = feedparser.parse(self.url, self.etag, + # Kludge for inadequate authentication support in + # urllib2. + u = self.url + if u.startswith("https:"): + import urllib + u = urllib.urlopen(u) + + p = feedparser.parse(u, self.etag, self.modified, "rawdog/" + VERSION) status = p.get("status") except: -- 2.35.1