Hexer10 / youtube_explode_dart

Dart library to interact with many Youtube APIs
https://pub.dev/packages/youtube_explode_dart
BSD 3-Clause "New" or "Revised" License
299 stars 122 forks source link

Need help in getting audio urls from the list of youtube URLs #233

Closed thomasp7983 closed 1 year ago

thomasp7983 commented 1 year ago

Hi,

I am trying to get the audio URLs from the list of youtube IDs. I have 187 youtube ids and I need to get audio URLs. However, it is taking really long time.

Below is the Method I am using.

for(var i = 0; i < audioHymnList.length; i++){ final video = await yt.videos.get("https://youtube.com/watch?v=${audioHymnList[i].youtubeID}"); endDuration = video.duration!; //print("My Duration : " + endDuration.toString()); final manifest = await yt.videos.streamsClient.getManifest(audioHymnList[i].youtubeID); final streams = manifest.audioOnly; audio = streams.first.url;

    }

Please help if there is any alternate way to get the Audio URLs for all the youtube IDs

Hexer10 commented 1 year ago

Unfortunately there is no other way to get all the audio urls. If you are referring to the download speed, that should be improved in the latest version (v.1.12.4).