migrated my youtube history to new account

2025-11-19 pythonyoutube

I canceled 3 subscriptions and bought youtube premium. But I subsribed with a different account than what I normally use to watch youtube. I wanted to personalize with my watch history and things I like to watch. Apparantly, youtube doesn't allow you to transfer your watch history to another account. But you can export some events (like subscription, search and watch history) using Google Takeout.

I exported YT and YT music data from two different accounts. Then I asked gemini to create scripts that automate browser actions. It gave the code that uses webdriver (in my case, chromedriver) to log in to my google account. I ran three scripts to subscribe to channels, replay the videos and populate search history. Google doesn't let you export events such as likes, comments, saves etc.

Watching all the videos may take a lot of time, so watch_history_replayer.py has params–NUM_TABS to set number of simultaneous tabs and WATCH_TIME_SECONDS to set the time each video plays for. The script creates the number of video batches based on NUM_TABS and plays each video for WATCH_TIME_SECONDS in each batch. Unfortunately, I couldn't segregate the videos from shorts.

I found the process cumbersome to set up. If you have a better way to do this, lmk.