mitchelljy/Trending-YouTube-Scraper ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python script that pulls the currently trending YouTube videos for a list of countries and saves the results into CSV files, one file per country.

I want it to use a YouTube Data API key from a local text file, and I want to be able to change the key file path, the country codes file path, and the output folder from the command line. The country list should be read from a simple text file with two letter country codes, and the script should handle a small default set out of the box.

Each output file should include the most useful details about the trending videos, like titles, IDs, channel info, publish date, views, likes, comments, and anything else that seems relevant. Please make it easy to run from the terminal, and include clear error handling if the API key is missing or a country code does not work. If you need to check current YouTube API docs online, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab