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

get stream URL #13

Open
Franknxtn opened this issue May 1, 2023 · 9 comments
Open

get stream URL #13

Franknxtn opened this issue May 1, 2023 · 9 comments

Comments

@Franknxtn
Copy link

Is there a way i can get the steam URL without the downloading?

@kewlbear
Copy link
Owner

kewlbear commented May 1, 2023

Maybe this? kewlbear/YoutubeDL-iOS#8

@Franknxtn
Copy link
Author

Screenshot 2023-05-03 at 10 13 33 PM

This shows up in log when i try to use this library.
Is this normal?

@kewlbear
Copy link
Owner

kewlbear commented May 3, 2023

I guess you can ignore it. Maybe setting some environment variable to a writable path could fix it.

@kewlbear
Copy link
Owner

kewlbear commented May 3, 2023

Looks like you can use this:

--cache-dir DIR                 Location in the filesystem where yt-dlp can
                                store some downloaded information (such as
                                client ids and signatures) permanently. By
                                default ${XDG_CACHE_HOME}/yt-dlp

@Franknxtn
Copy link
Author

Franknxtn commented May 6, 2023

I i try to extract info using extractInfo(url: URL) function, It works for first time. However, if i call this function in quick succession, the framework crashes.

Below is code sample i am using for link extraction:

 let youtubeDL: PythonObject = try await YtDlp().yt_dlp.YoutubeDL(["nocheckcertificate": true])
        
        let info = try PythonDecoder()
            .decode(
                Info.self,
                from: youtubeDL
                    .extract_info
                    .throwing
                    .dynamicallyCall(withKeywordArguments: ["": "WdFj7fUnmC0", "download": false])
            )

It returns me info object which contains [Format].

If i call above method in quick succession, it crashes randomly.

@kewlbear
Copy link
Owner

kewlbear commented May 6, 2023

Can you show stack trace or other relevant console output?

@Franknxtn
Copy link
Author

Sure, here are the stack traces:

Screenshot 2023-05-07 at 9 22 49 PM

Screenshot 2023-05-07 at 9 23 21 PM

Screenshot 2023-05-07 at 9 23 40 PM

Screenshot 2023-05-07 at 9 23 59 PM

Screenshot 2023-05-07 at 9 24 14 PM

Screenshot 2023-05-07 at 9 24 27 PM

@kewlbear
Copy link
Owner

Seems to me some kind of memory allocation or infinite loop issue.

@f0enix
Copy link

f0enix commented Jun 5, 2023

I i try to extract info using extractInfo(url: URL) function, It works for first time. However, if i call this function in quick succession, the framework crashes.

Below is code sample i am using for link extraction:

 let youtubeDL: PythonObject = try await YtDlp().yt_dlp.YoutubeDL(["nocheckcertificate": true])
        
        let info = try PythonDecoder()
            .decode(
                Info.self,
                from: youtubeDL
                    .extract_info
                    .throwing
                    .dynamicallyCall(withKeywordArguments: ["": "WdFj7fUnmC0", "download": false])
            )

It returns me info object which contains [Format].

If i call above method in quick succession, it crashes randomly.

I tried using this but it fails on certain non video urls due to the missing formats key in the response. Have you encountered this issue? I posted more details here:
kewlbear/YoutubeDL-iOS#9 (comment)

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

3 participants