[Tutor] Truncated urlopen
sulinet at postafiok.hu
Mon Feb 11 16:00:18 CET 2013
2013/2/11 Dave Angel <davea at davea.name>
> I'd suggest splitting that expression into two separate statements, one
> that does the read, and the other that decodes. Then you can print the
> byte-string, and see if it also is truncated, or whether that happened
> during the decoding.
> Also, if you use print( repr(mystring) )
> you might discover that there are funny escape sequence characters that
> are fooling your console.
none of these helps. They are truncated as well.
But I noticed a strange phenomenon. I am supposed to login to this page,
but I can reach CVS data without login if I use the direct link to export.
This may be a bug, but I like it. :-) Now, If I use the same link in
browser, I get different results depending on I have logged in or not. (But
in the first times of gathering data in this table, my Python script worked
So I should try to log in, but I have always difficulties with logging in
from Python. I know http://docs.python.org/3/howto/urllib2.html#id6, but I
couldn't use it in practice.
Another way would be to log in in the browser correctly, then export CVS
and process it with Python after saving, but I am too lazy to repeat this
all the time. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor