Use this knowledge at your own risk.
youtube-dl will allow you to download entire youtube playlists and store them as MP3s. This will also allow you to download individual MP3s.
| #!/bin/bash | |
| curl -s \ | |
| --data-urlencode "url=$1" \ | |
| --data-urlencode "format=json" \ | |
| http://www.youtube.com/oembed | | |
| jq '.title' |
| Service | SSL | status | Response Type | Allowed methods | Allowed headers |
|---|
| /* | |
| * Copyright (c) 2003 Fabrice Bellard | |
| * | |
| * This file is part of FFmpeg. | |
| * | |
| * FFmpeg is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU Lesser General Public | |
| * License as published by the Free Software Foundation; either | |
| * version 2.1 of the License, or (at your option) any later version. | |
| * |
| // Run from the dev tools console of any Youtube video | |
| // Accurate as of July 2, 2020. | |
| // | |
| // Copy and paste this into the dev console in a browser with the desired video loaded. | |
| // | |
| // NOTE: Some Youtube videos do not directly expose the video url in the response. | |
| // This script doesn't currently attempt to handle those. It will work for most other general video types though. | |
| (async () => { | |
| const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text); |
| ''' | |
| I've installed a new wifi card on my laptop with bluetooth support, | |
| but there is no shortcut in my keyboard to swtich on/off bluetooth. | |
| This script + custom shortcut with your linux DE (or other) work perfectly | |
| ''' | |
| from PyQt5.QtCore import QCoreApplication | |
| from PyQt5.QtBluetooth import QBluetoothLocalDevice | |
| if __name__ == '__main__': |
| @echo off | |
| rem ===================================================== | |
| rem Converts a MP3 file to a M4R file using ffmpeg. | |
| rem Usage: Drop a MP3 file at the top of this batch file. | |
| rem ===================================================== | |
| set ffmpeg_exe="C:\ffmpeg\ffmpeg-20150619-git-bb3703a-win64-static\bin\ffmpeg.exe" | |
| rem %~f1 = Full File Path, with drive letter | |
| rem %~p1 = Drive Letter | |
| rem %~p1 = Path Only |
| import gdata.youtube | |
| import gdata.youtube.service | |
| # Dependencies: | |
| # - Python==2.7 | |
| # - gdata==2.0.18 | |
| # - google-api-python-client==1.2 | |
| """ | |
| setup: | |
| pip install requests | |
| pip install requests[socks] | |
| super helpful: | |
| - http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/ | |
| - http://docs.python-requests.org/en/master/user/advanced/#proxies | |
| """ |