Coder Social home page Coder Social logo

Comments (8)

emericg avatar emericg commented on August 16, 2024 1

Allright I've finally set the timer to 2s (it was 0.33s before this bug report) let's see if it's better.

from opensubtitlesdownload.

emericg avatar emericg commented on August 16, 2024

Hi!
Allright, there is probably some room for improvement here. You are using automatic selection & downloading right ?

By looking at the code, a limitation should already be in place, good enough for 40 searchs per 10 seconds. If it's not working, then it's probably because by HTTP requests they mean connection, search, download and disconnection are counted instead of just searches.
So I moved the timer to take account the first search too (4a06879), but can you try what timer value is working out for you?
If it's 10s / 4 requests then the timer should be at 1.0s (latencies here and there should ensure we don't hit the limit). Right now it's at 0.33s.

Of course another way too look at this without resorting to huge timer value is to move the dispatch into the main loop so we can connect/disconnect just once, and avoid a couple of unnecessary requests, like it was actually done years ago. It's only possible for CLI (or GUI full auto) requests. I'll do that later though, because it require a little (probably a lot) more testing...

from opensubtitlesdownload.

muzzol avatar muzzol commented on August 16, 2024

I'm having this problem too.
I'm using a registered user and I configured correctly osd_username and osd_password but I still get

xmlrpclib.ProtocolError: <ProtocolError for api.opensubtitles.org/xml-rpc: 429 Too Many Requests>

maybe you could add a parameter to specify miliseconds to wait between searches.

from opensubtitlesdownload.

shoon avatar shoon commented on August 16, 2024

Would also like to see this as an argument. As a hack, the -i argument can be used to provide a resume-like functionality as it will skip the GET request for any scanned file that already has a corresponding srt file:

./OpenSubtitlesDownload.py --cli -i /PATH/OR/FILE

 ... 429 Too Many Requests>

./OpenSubtitlesDownload.py --cli -i /PATH/OR/FILE

from opensubtitlesdownload.

emericg avatar emericg commented on August 16, 2024

Ok I've upped the wait time to 1s between two searches, that should be enough.
I'll let this issue open a bit to see if we still have problems here.

from opensubtitlesdownload.

abarisain avatar abarisain commented on August 16, 2024

Hi,

I still get 429s, even on a VIP account. I can get ~20 requests in before getting throttled.

I don't mind waiting so I bumped the wait to 5s, and it seems fine.

from opensubtitlesdownload.

emericg avatar emericg commented on August 16, 2024

Hum :( what's the lowest value that seems to work for you?

from opensubtitlesdownload.

abarisain avatar abarisain commented on August 16, 2024

Two seconds seem to work fine!

from opensubtitlesdownload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.