Topic on Project:Support desk

Connect to https wiki-site api with wikitools.py

4
Carchaias (talkcontribs)

I try to create a little python script and have problems to connect my Wiki .

from wikitools import * 
s = wiki.Wiki('https://aquanautweb.de/testwiki/api.php') 

results in

==== RESTART: C:\Users\XXXXXXX\test_wikitools.py ==== 
URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:590)> trying request again in 5 seconds 
URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:590)> trying request again in 10 seconds 

It works with https://en.wikipedia.org or other wikipedia pages. The API on my wiki is turned on so I can send requests via the browser. It works further with another wiki that has no TLS. I think someting is going wrong on the server-side but I have no idea what.

Ciencia Al Poder (talkcontribs)

Your server seems to use TLSv1.0, and that python lib seems to use 1.2 by default. See this SO question

Carchaias (talkcontribs)
Ciencia Al Poder (talkcontribs)

true, they not use requests, but httplib2, with the same problem. Here's another answer for httplib. This seems to be a problem with ssl, used by both requests and httplib2

Reply to "Connect to https wiki-site api with wikitools.py"