john wrote: > I'm trying to access the XML version of my Tivo now playing list with > python. It uses auth digest HTTP authentication. I could really use > some help! > > I'm able to get this page using curl: > curl --dump-header tivoHeaders --insecure --anyauth --user tivo:8000008 > "https://192.168.1.102/TiVoConnect?Command=QueryContainer&Container=%2FNowPlaying&Recurse=Yes" > > But > > when I use my python script, I get rejected: > https://192.168.1.102/TiVoConnect?Container=%2FNowPlaying&Command=QueryContainer&Recurse=Yes > Error > > 401 > Server: tivo-httpd-1:7.1b-01-2:140 > Set-Cookie: sid=DEC2D78EABF48A6D; path=/; expires="Saturday, > 16-Feb-2013 00:00:00 GMT"; > WWW-Authenticate: Digest realm="TiVo DVR", nonce="FD08EF226909CA85", > qop="auth" > Content-Length: 31 > Content-Type: text/html > Connection: close > > Digest realm="TiVo DVR", nonce="FD08EF226909CA85", qop="auth" > > I've scrounged for examples out there and the couple that I've found > just don't seem to work for me.. > > Here's one way I've tried: > ===================================== > import urllib2 > > theurl = > "192.168.1.102/TiVoConnect?Container=%2FNowPlaying&Command=QueryContainer&Recurse=Yes" > print >
Oh yeah - I didn't spot this before.... theurl = "192.168.1.102/TiVoConnect?Container=%2FNowPlaying&Command=QueryContainer&Recurse=Yes" this includes the parameters - which it shouldn't. :-) Fuzzy http://www.voidspace.org.uk/python -- http://mail.python.org/mailman/listinfo/python-list