OK, so I'm trying the XML-RPC out, it works fine concerning the GetAvailableTranslations function, but I just can't get the GetTranslation function to work, it just keeps on telling me
Code: Select all
{'status': '410 Other or unknown error', 'seconds': 0.34000000000000002}
So I tryed changing some parameters, but I can't get it to work... Is there any current problem with the website, or am I doing something wrong?
This is a piece of my python code, in case you can spot an error from my part:
Code: Select all
class gettranslations():
"Class that retrieves the translations fro the OpenSubtiltes.org website using XML-RPC"
def __init__(self):
print "Retrieving " + app_globals.app_name + "'s up to date translations..."
self.__xmlrpcurl = "http://dev.opensubtitles.org/xml-rpc"
#self.__xmlrpcurl = "http://www.opensubtitles.org/xml-rpc"
print "Connecting to " + self.__xmlrpcurl + "..."
self.server = xmlrpclib.Server(self.__xmlrpcurl);
temp = self.server.GetAvailableTranslations("", "subdownloader")
print temp
for tt in temp["data"]:
print tt + " " + temp["data"][tt]["StringsNo"]
temp = self.server.GetTranslation("", "en", "po", "subdownloader")
print temp
And this is what I get back from my little test program:
Code: Select all
Retrieving osTools's up to date translations...
Connecting to http://dev.opensubtitles.org/xml-rpc...
{'status': '200 OK', 'seconds': 0.0060000000000000001, 'data': {'en': {'LastCreated': '2007-03-13 12:22:14', 'StringsNo': '218'}, 'zh': {'LastCreated': '2007-09-15 08:58:20', 'StringsNo': '218'}, 'gr': {'LastCreated': '2007-09-23 14:01:11', 'StringsNo': '186'}, 'vi': {'LastCreated': '2007-09-26 10:35:58', 'StringsNo': '218'}, 'it': {'LastCreated': '2007-07-06 11:48:21', 'StringsNo': '216'}, 'ar': {'LastCreated': '2007-08-31 23:58:22', 'StringsNo': '218'}, 'cs': {'LastCreated': '2007-03-20 10:19:17', 'StringsNo': '218'}, 'et': {'LastCreated': '2007-05-07 20:43:40', 'StringsNo': '218'}, 'gl': {'LastCreated': '2007-10-11 16:23:40', 'StringsNo': '218'}, 'id': {'LastCreated': '2007-08-29 04:15:09', 'StringsNo': '217'}, 'es': {'LastCreated': '2007-03-16 11:20:36', 'StringsNo': '218'}, 'ru': {'LastCreated': '2007-08-29 04:51:19', 'StringsNo': '81'}, 'nl': {'LastCreated': '2007-03-16 17:45:27', 'StringsNo': '218'}, 'pt': {'LastCreated': '2007-03-24 09:27:41', 'StringsNo': '218'}, 'pb': {'LastCreated': '2007-03-26 14:52:17', 'StringsNo': '218'}, 'ro': {'LastCreated': '2007-07-26 17:54:42', 'StringsNo': '200'}, 'pl': {'LastCreated': '2007-04-18 12:37:40', 'StringsNo': '218'}, 'fr': {'LastCreated': '2007-03-17 08:47:02', 'StringsNo': '218'}, 'bg': {'LastCreated': '2007-09-14 17:50:41', 'StringsNo': '96'}, 'de': {'LastCreated': '2007-05-14 14:14:11', 'StringsNo': '216'}, 'da': {'LastCreated': '2007-03-17 11:46:58', 'StringsNo': '218'}, 'fi': {'LastCreated': '2007-03-13 20:31:22', 'StringsNo': '218'}, 'hu': {'LastCreated': '2007-05-16 18:35:41', 'StringsNo': '218'}, 'ja': {'LastCreated': '2007-10-18 06:05:27', 'StringsNo': '91'}, 'he': {'LastCreated': '2007-08-17 03:41:21', 'StringsNo': '218'}, 'sr': {'LastCreated': '2007-09-05 10:16:25', 'StringsNo': '155'}, 'sv': {'LastCreated': '2007-08-13 22:45:26', 'StringsNo': '218'}, 'sk': {'LastCreated': '2007-03-13 13:43:33', 'StringsNo': '218'}}}
en 218
zh 218
gr 186
vi 218
it 216
ar 218
cs 218
et 218
gl 218
id 217
es 218
ru 81
nl 218
pt 218
pb 218
ro 200
pl 218
fr 218
bg 96
de 216
da 218
fi 218
hu 218
ja 91
he 218
sr 155
sv 218
sk 218
{'status': '410 Other or unknown error', 'seconds': 0.059999999999999998}
Please tell me if I'm doing something wrong...
Thanks,
dbaalborg...