Closed isa-sabbagh closed 2 years ago
Describe the bug publishDate and uploadDate in playlist return null all the time
void _getList() async { setState(() => _isLoading = true); try { var yt = YoutubeExplode(); // Get playlist metadata. var playlist = await yt.playlists.get('https://www.youtube.com/playlist?list=PLDoPjvoNmBAzH72MTPuAAaYfReraNlQgM'); await for (var video in yt.playlists.getVideos(playlist.id)) { print(video.publishDate); // retren null setState(() { _videosList.add(YoutubeVideo( id: video.id.toString(), image: video.thumbnails.lowResUrl, title: video.title, url: video.url, videoPublishedAt: video.publishDate ?? video.uploadDate ?? DateTime.now(), )); }); } } finally { setState(() => _isLoading = false); } }
That is the intended behavior unfortunately; as you can see in the playlist page youtube doesn't provide any publish or upload date.
Describe the bug publishDate and uploadDate in playlist return null all the time