Skip to content

Instantly share code, notes, and snippets.

View hmelenok's full-sized avatar
🙊
Coding

Mykyta Khmel hmelenok

🙊
Coding
View GitHub Profile
@hmelenok
hmelenok / remove-colors-bg-in-dom.js
Created December 16, 2022 10:19
remove colors from bg of elements
Array.from(document.querySelectorAll('.edit-detailed-section *')).filter(el => {
if(el.style["background-color"] === 'rgb(255, 255, 255)' || el.style["background-color"] === 'white'){
el.style["background-color"] = '';
}
});
//Remove any color
Array.from(document.querySelectorAll('.edit-detailed-section *')).filter(el => {
if(el.style["background-color"]){
@hmelenok
hmelenok / youtube_categories.py
Created October 30, 2023 18:58
Populate Youtube category by videos id's
import requests
import json
API_KEY = 'YOUR_YOUTUBE_API_KEY'
VIDEO_IDS = ['1Ds2G7lcrxA', 'AnotherVideoID', ...] # Replace with your list of video IDs
BASE_URL = "https://www.googleapis.com/youtube/v3/videos"
def get_video_details(video_id):
params = {
'part': 'snippet',
@hmelenok
hmelenok / html_to_csv.py
Created October 30, 2023 19:01
Google Takeout YouTube watched video HTML to CSV script (exports to: Products,Video title,Video Link,Channel Name,Channel Link,Date)
from bs4 import BeautifulSoup
import csv
# Load the content from the HTML file
with open('input.html', 'r', encoding='utf-8') as file:
content = file.read()
soup = BeautifulSoup(content, 'lxml')
# Prepare a list to hold the extracted data