wtekiela / opensub4j

Java library for communicating with opensubtitles.org XML-RPC API
Other
47 stars 19 forks source link

org.apache.xmlrpc.client.XmlRpcHttpTransportException: HTTP server returned unexpected status: Too Many Requests #15

Closed Chris-YiMing closed 5 years ago

Chris-YiMing commented 5 years ago

Hello, I applied for vip account and userAgent, but when searching for subtitles, because there are more users requesting, I have reported an error (Too Many Requests), may I ask, is there any good way to lift this restriction?

wtekiela commented 5 years ago

This is not related to the library itself, but the way opensubtitles.org provides its service.

If you have a VIP account, please make sure to login using vip server, as stated here

Note: don't send any cookies using XML-RPC communication. If VIP user is logged, in HTTP response headers and XML-RPC [data] field is returned: Content-Location: ​https://vip-api.opensubtitles.org.local/xml-rpc - your application should change host to continue communicating with VIP API server. This API server is special for VIP users, it is more stable and faster.

The Too Many Requests comes from a limit on the standard server, which allows 40 HTTP requests per 10 seconds per IP address, read more here.

Please refer to the original API documentation for more details: https://trac.opensubtitles.org/projects/opensubtitles/wiki/XMLRPC