This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 🔥 Script to automatically remove all videos from your YouTube "Liked Videos" playlist. | |
* | |
* 📌 How it works: | |
* - Scrolls to each video in the Liked Videos playlist | |
* - Opens the three-dot menu | |
* - Clicks "Remove from Liked videos" | |
* | |
* 💡 Usage: | |
* 1. Go to your Liked Videos playlist: https://www.youtube.com/playlist?list=LL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def convert_str_to_number(x): | |
total_stars = 0 | |
num_map = {'K':1000, 'M':1000000, 'B':1000000000} | |
if x.isdigit(): | |
total_stars = int(x) | |
else: | |
if len(x) > 1: | |
total_stars = float(x[:-1]) * num_map.get(x[-1].upper(), 1) | |
return int(total_stars) |