1

I tried to use webbrowser.open() function to open a long url in python, but it seems it cannot open a long url correctly. The string passed to this function is truncated to about 2083 bytes long and only the front part is opened. The code is sth like this

import webbrowser
url = 'www.google.com/parametersssssssssss....' #very very long
webrowser.open(url) #only front part is opened

No exception is tracked. Anyone has similar situation about it?

cljs0280
  • 21
  • 1
  • 2
  • 2
    it is not a `webbrowser` limit, it is *real* browsers limit http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers?rq=1 – xiº Oct 07 '15 at 12:45

1 Answers1

1

Since webbrowser it is just iterface to allow displaying web-based documents it is not handling urls by himself. There is just transferring of urls into installed browsers.

Good description of max length of URL in different browsers.

Community
  • 1
  • 1
xiº
  • 4,605
  • 3
  • 28
  • 39