2010-08-25, 03:01
HenrikDK Wrote:I've discovered two errors in our login code:
1. Previously we url-encoded our login request, but didn't tell youtube we did so in the request header. This has probably caused *alot* of problems for people with any non-ascii chars in their username or password. Before i fixed this any request filled with nonsense like: "#€&)€=´–·÷=#?€!?~@±''“¡± would cause the error in your log, now you should get the "bad username or password".
2. Previously we lied about our user-agent and told YouTube that the request came from a machine running IE6. This is a really stupid thing to do, when you're trying to write login code. This has probably caused some connection error as Youtube would probably default to it's Internet Explorer "compliant" code, and who knows what that contains. Again, after this change it has become extremely difficult for me to provoke the "<urllib2.URLError instance at 0xaecb5e04>" from your logs.
/Henrik DK
i think this may have something to do with my problem. I have a '\' in my password. Could that be the reason that I can't login and the script is failing?