Skip to content

Instantly share code, notes, and snippets.

View muhammedfurkan's full-sized avatar
🙃

M.Furkan muhammedfurkan

🙃
View GitHub Profile
@kartikay-bagla
kartikay-bagla / playlist_downloader.py
Last active May 23, 2020 11:54
Downloads all videos in a YouTube playlist as audio files.
from pytube import YouTube, Playlist
import progressbar
pl = Playlist(url= "") # Enter YouTube playlist link here.
pl.populate_video_urls()
print("[INFO] Number of Links: {}".format(len(pl.video_urls)))
widgets = ["[INFO] Downloading Video: ", progressbar.Percentage(), " ", progressbar.Bar(), " ", progressbar.ETA()]
@sotlucas
sotlucas / yt_downloader.py
Last active May 23, 2020 11:59
Downloads a whole youtube playlist & converts all to mp3
import os
import subprocess
import pytube
from time import sleep
import sys
def show_progress_bar(stream, chunk, file_handle, bytes_remaining):
"""
Shows progress bar
"""
@dukn
dukn / download_image_parallel.py
Created August 23, 2018 09:55
download image form link farallel
import os
import sys
import wget
import pandas as pd
from multiprocessing import Pool
FILE_PATH = sys.argv[1]
def get_file_paths(FILE_PATH):
df = pd.read_csv(FILE_PATH, header=None)
@meetmangukiya
meetmangukiya / downloader.py
Created June 4, 2018 07:35
Download youtube videos as mp3 from a given playlist
import sys
import youtube_dl
opts = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
@Kyle2142
Kyle2142 / Userbot admin scripts.md
Last active July 2, 2021 11:52
Some helper scripts that might be of use, for multi-userbot, multi-group administration

All of these were created to work with multiple client situations, but you can easily pass [client] to work on one.

Note that in most cases, you will need to tweak the instructions (e.g. by adding exception handling) if the clients you run it on are not admins, or other things that happen in "less-than-perfect" situations

@iannase
iannase / soundscraper.py
Created April 8, 2018 22:13
Python web scraper that gets the new / top 50 charts, also allows you to play tracks using the selenium browser
from selenium import webdriver
import requests
import bs4
import os
# new, top, or mix url
top_url = "https://soundcloud.com/charts/top"
new_url = "https://soundcloud.com/charts/new"
track_url = "https://soundcloud.com/search/sounds?q="
artist_url = "https://soundcloud.com/search/people?q="
@zjiayao
zjiayao / download_from_shared_google_drive.py
Created March 11, 2018 14:39
Download file from shared Google Drive link.
from __future__ import print_function
import os
import requests
URL = "https://docs.google.com/uc?export=download"
ID = "" # the file ID appeared in the shared link
DATAFILE = "" # the name of the file to be downloaded
if __name__ == '__main__':
import time
import RPi.GPIO as GPIO
import os
import picamera
from telethon import TelegramClient
# Pin an dem der Bewegungsmelder angeschlossen ist
sensor_port = 12
# Empfänger der Alarme (Telegram Nutzername)
@barbietunnie
barbietunnie / install-python-c9.sh
Created February 19, 2018 14:13
Install Python 3.6+ on Cloud 9 IDE
sudo apt-get install libssl-dev openssl
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar xzvf Python-3.6.4.tgz
cd Python-3.6.4.tgz
./configure
make
sudo make install
# Check if python 3.6 is installed
python3.6
@Airtnp
Airtnp / PDF_download.py
Last active December 21, 2020 21:59
PDF_download.py
from urllib.request import urlretrieve
import requests
from bs4 import BeautifulSoup
import sys
import os
import socket
socket.setdefaulttimeout(150)
import re
class DownloadError: