Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media stream support problem #357

Open
merloisac opened this issue Sep 27, 2021 · 4 comments
Open

Media stream support problem #357

merloisac opened this issue Sep 27, 2021 · 4 comments

Comments

@merloisac
Copy link

Re-opening it cause the same problem started to happen, the website I'm trying to scrape now is twitch.tv, the m3u8 is loading forever until it reaches timeout

import {Agent} from 'secret-agent';

(async () => {
    process.env.SA_SHOW_BROWSER = "true";
    const agent = new Agent();
    await agent.goto(`https://player.twitch.tv/?channel=gaules&enableExtensions=true&muted=false&parent=twitch.tv&player=popout&volume=0.5&mature=true&quality=160p30`);
    const m3u8 = await agent.waitForResource({url:/m3u8/}, {timeoutMs: 120000});
    console.log(m3u8[0].url);
    await agent.waitForMillis(100000);

})();

The same doesn't happen on normal chrome browser, it loads "instantly"

Originally posted by @merloisac in #337 (comment)

@merloisac
Copy link
Author

#337

@blakebyrnes
Copy link
Contributor

@merloisac which command is timing out? If you have a session database, would be very appreciated (https://secretagent.dev/docs/advanced/session)

@merloisac
Copy link
Author

The m3u8 request response is being timed out, I attached the SA session here
sa_sess.zip

@blakebyrnes
Copy link
Contributor

@merloisac Just a quick followup: this completes some of the time for me. The database you shared actually shows your m3u8 returning.

Are you seeing actual timeout errors?

Or are you wishing it would prompt immediately that the "m3u8" is available and then allow you to stream it? Right now, it is waiting to be fully downloaded before returning, which seems like a bad model for a large asset like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants