Skip to content

Old code snippets

Thijs Takken edited this page Mar 20, 2024 · 4 revisions

Dit uit code gehaald maar misschien handig voor later: print "Here is your link to the file: " + link_info.get_link()

Niet langer hardcoded directory structuur aanmaken. Hiervoor deze code weggehaald, maar misschien handig voor later nog.

fullurl = url + 'music' r = requests.request('MKCOL', fullurl, auth=(username, password)) print(r.text) print("and the url used:") print(r.url)

Weggehaald, later kijken naar de content types: #path = root+'/'+filename #print('to ' + fullurl + '\n' + path) #openBin = {'file':(filename,open(path,'rb').read())} #headers = {'Content-type': 'text/plain', 'Slug': filename}\

Dit zijn alle opties die ik in het batch script gebruiken, deze allemaal in de Python code ook als opties inzetten: youtube-dl --no-cache-dir --no-check-certificate --download-archive downloaded.txt --no-post-overwrites -ciwx --output "%cd%\Music\Dubstep%%(title)s-%%(id)s.%%(ext)s" -f bestaudio[asr=44100] --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=xxxxxxxxxxxxxxxx

Clone this wiki locally