fate0 / pychrome

A Python Package for the Google Chrome Dev Protocol [threading base]
Other
612 stars 112 forks source link

JSONDecodeError on Chrome(ium) 111 #60

Open jerivas opened 1 year ago

jerivas commented 1 year ago

It looks like Chrome now requires a PUT request to start the dev tools. Starting a new tab now produces a JSONDecodeError because the response is not JSON. The actual response is a 405 with the content: Using unsafe HTTP verb GET to invoke /json/new. This action supports only PUT verb.

https://github.com/fate0/pychrome/blob/c6c755b9964eead9a84dd57e84f53eb9981b26ac/pychrome/browser.py#L33

jerivas commented 1 year ago

BTW, changing that line to requests.put(...) fixes the issue, but I also needed to work around https://github.com/fate0/pychrome/issues/59#issuecomment-1467009832 to start the tab properly

sc231997 commented 1 year ago

BTW, changing that line to requests.put(...) fixes the issue, but I also needed to work around #59 (comment) to start the tab properly

I have raised PR #62 for new tab change. For me list tab is working fine on chrome version 111.0.5563.112

4ft35t commented 1 year ago

https://github.com/DistriNet/pychrome works fine