Skip to content

Instantly share code, notes, and snippets.

View raphaelmartin's full-sized avatar

Raphaël Martin Melizi raphaelmartin

  • France
  • 23:24 (UTC +02:00)
  • X @rphlmm
View GitHub Profile
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import random
import sys
def print_same_line(text):
sys.stdout.write('\r')
sys.stdout.flush()
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active July 7, 2024 18:37
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@paschoaletto
paschoaletto / vimeo_downloader.py
Last active September 13, 2022 13:52
Downloads segmented audio+video from Vimeo and saves as .mp4 - Usage: 'python vimeo_downloader.py http://...master.json?base64_init=1 optional_name' modified from https://gist.github.com/tayiorbeii/d78c7e4b338b031ce8090b30b395a46f that was modified from https://gist.github.com/alexeygrigorev/a1bc540925054b71e1a7268e50ad55cd
import requests
import base64
from tqdm import tqdm
import sys
import subprocess as sp
FFMPEG_BIN = 'ffmpeg.exe'
master_json_url = sys.argv[1]
base_url = master_json_url[:master_json_url.rfind('/', 0, -26) - 5]
@ibroadfo
ibroadfo / readinglist.py
Last active September 23, 2018 21:53
Export Safari Reading List bookmarks to pinboard
#!/usr/bin/env python
"""
forked from http://alexwlchan.net/2015/11/export-urls-from-safari-reading-list/
Requires Python 3.
"""
import os
import plistlib
INPUT_FILE = os.path.join(os.environ['HOME'], 'Library/Safari/Bookmarks.plist')
@mledoze
mledoze / download-arte.tv-videos.md
Last active February 16, 2021 20:43
This tutorial explains how to download videos from http://www.arte.tv/

Edit 2021/02/16: warning

This gist is very old. I don't even know if it still works. Check the comments below to find more robust solutions, like youtube-dl for example, see this comment.

1

Go to http://www.arte.tv/ and select any videos, for example http://www.arte.tv/guide/fr/046618-011/silex-and-the-city

2

In the source code extract the src parameter of the iframe player:

http://www.arte.tv/player/v2/index.php?json_url=http%3A%2F%2Farte.tv%2Fpapi%2Ftvguide%2Fvideos%2Fstream%2Fplayer%2FF%2F046618-011_PLUS7-F%2FALL%2FALL.json&lang=fr_FR&config=arte_tvguide&rendering_place=http://www.arte.tv/guide/fr/046618-011/silex-and-the-city

@plentz
plentz / nginx.conf
Last active July 2, 2024 13:20
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048