I Just Got Rick Rolled by Chat GPT
2 by cjoverbay | 0 comments on Hacker News.
My Prompt: Can you write some python code that gets the view count, the title, and the thumbnail from a youtube video link? The response: Sure, here is some example code that gets the view count, title, and thumbnail from a youtube video link using the youtube-dl library: import youtube_dl # Set the youtube video URL url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ" # Use youtube-dl to get video information with youtube_dl.YoutubeDL() as ydl: video_info = ydl.extract_info(url, download=False) # Print the video view count, title, and thumbnail print(video_info['view_count']) print(video_info['title']) print(video_info['thumbnail']) Note that you need to have the youtube-dl library installed to run this code. You can install it using pip install youtube-dl.

Post a Comment

Previous Post Next Post