Project

General

Profile

Feature #977

Add support for authentication

Added by Luke Murphey over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
02/23/2015
Due date:
% Done:

100%

History

#1 Updated by Luke Murphey over 9 years ago

Feedparser isn't accepting the auth headers for some reason.

This works:

        auth = SyndicationModularInput.get_auth_handler("http://127.0.0.1:8888/rss_example.xml", username="admin", password="changeme")   

        opener = urllib2.build_opener(auth)
        resp = opener.open('http://127.0.0.1:8888/rss_example.xml')

        self.assertEqual(resp.code, 200)

But this does not:

        auth = SyndicationModularInput.get_auth_handler("http://127.0.0.1:8888/rss_example.xml", username="admin", password="changeme")   

        d = feedparser.parse('http://127.0.0.1:8888/rss_example.xml', handlers=[auth])

        self.assertEquals(d['status'], 200)

#2 Updated by Luke Murphey over 9 years ago

Removing the http_error_401 function from _FeedURLHandler seems to resolve the problem. Not sure why yet.

#3 Updated by Luke Murphey over 9 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF