1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Python requests.get method stuck on audio streams [duplicate]

Discussão em 'Python' iniciado por Stack, Setembro 15, 2024.

  1. Stack

    Stack Membro Participativo

    requests.get gets stuck on streams, like, for example,

    https://centova.radios.com.pt/proxy/476?mp=/stream
    https://nl.digitalrm.pt:8216/stream


    Is there any way to detect this automatically and abort? I don't know beforehand what kinds of addresses I'm visiting. I was expecting get to time out.

    I've tried connect and read timeouts, but they don't do anything...

    from requests import get
    response = get("https://centova.radios.com.pt/proxy/476?mp=/stream", timeout = 5)


    I wish there was an absolute timeout.

    Continue reading...

Compartilhe esta Página