dos2unix line endings
This commit is contained in:
parent
32093b62b2
commit
becec28e1c
@ -1,32 +1,32 @@
|
|||||||
#!/bin/python
|
#!/bin/python
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
|
||||||
with open("linklist-music.yaml", "r") as yamlfile:
|
with open("linklist-music.yaml", "r") as yamlfile:
|
||||||
try:
|
try:
|
||||||
config = yaml.safe_load(yamlfile)
|
config = yaml.safe_load(yamlfile)
|
||||||
|
|
||||||
for entry in config:
|
for entry in config:
|
||||||
print(f"\033[92mGrabbing '{entry['url']}':\033[0m")
|
print(f"\033[92mGrabbing '{entry['url']}':\033[0m")
|
||||||
|
|
||||||
folderName = entry["folder-name"] if "folder-name" in entry else "%(uploader)s"
|
folderName = entry["folder-name"] if "folder-name" in entry else "%(uploader)s"
|
||||||
os.system(f"""
|
os.system(f"""
|
||||||
|
|
||||||
yt-dlp
|
yt-dlp
|
||||||
-c
|
-c
|
||||||
--extract-audio
|
--extract-audio
|
||||||
--audio-format mp3
|
--audio-format mp3
|
||||||
--merge-output-format mkv
|
--merge-output-format mkv
|
||||||
-o 'music/{folderName}/%(title)s.%(ext)s'
|
-o 'music/{folderName}/%(title)s.%(ext)s'
|
||||||
--extractor-args youtube:player_client=android
|
--extractor-args youtube:player_client=android
|
||||||
--throttled-rate 100M
|
--throttled-rate 100M
|
||||||
--restrict-filenames
|
--restrict-filenames
|
||||||
--download-archive alreadydownloaded-music.txt
|
--download-archive alreadydownloaded-music.txt
|
||||||
--match-filter "duration < 36000"
|
--match-filter "duration < 36000"
|
||||||
'{entry['url']}'
|
'{entry['url']}'
|
||||||
""".replace('\n', " ")
|
""".replace('\n', " ")
|
||||||
)
|
)
|
||||||
|
|
||||||
except yaml.YAMLError as exc:
|
except yaml.YAMLError as exc:
|
||||||
print("You fucked up the yaml format.")
|
print("You fucked up the yaml format.")
|
||||||
|
|
||||||
|
@ -1,46 +1,46 @@
|
|||||||
#!/bin/python
|
#!/bin/python
|
||||||
# This script is for downloading stuff ONCE. This is for, let's say, playlists that will never change again that you want to download.
|
# This script is for downloading stuff ONCE. This is for, let's say, playlists that will never change again that you want to download.
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
|
||||||
with open("once.yaml", "r") as yamlfile:
|
with open("once.yaml", "r") as yamlfile:
|
||||||
try:
|
try:
|
||||||
config = yaml.safe_load(yamlfile)
|
config = yaml.safe_load(yamlfile)
|
||||||
|
|
||||||
for entry in config:
|
for entry in config:
|
||||||
print(f"\033[92mGrabbing {entry['type']} '{entry['url']}':\033[1m")
|
print(f"\033[92mGrabbing {entry['type']} '{entry['url']}':\033[1m")
|
||||||
if entry["type"] == "music":
|
if entry["type"] == "music":
|
||||||
|
|
||||||
os.system(f"""
|
os.system(f"""
|
||||||
yt-dlp
|
yt-dlp
|
||||||
-c
|
-c
|
||||||
--extract-audio
|
--extract-audio
|
||||||
--audio-format mp3
|
--audio-format mp3
|
||||||
-o 'music/{entry['folder-name']}/%(title)s.%(ext)s'
|
-o 'music/{entry['folder-name']}/%(title)s.%(ext)s'
|
||||||
--extractor-args youtube:player_client=android
|
--extractor-args youtube:player_client=android
|
||||||
--throttled-rate 100M
|
--throttled-rate 100M
|
||||||
--restrict-filenames
|
--restrict-filenames
|
||||||
--download-archive alreadydownloadedonce-music.txt
|
--download-archive alreadydownloadedonce-music.txt
|
||||||
--match-filter "duration < 36000"
|
--match-filter "duration < 36000"
|
||||||
'{entry['url']}'
|
'{entry['url']}'
|
||||||
""".replace('\n', " ")
|
""".replace('\n', " ")
|
||||||
)
|
)
|
||||||
|
|
||||||
elif entry["type"] == "video" or entry["type"] == "videos":
|
elif entry["type"] == "video" or entry["type"] == "videos":
|
||||||
os.system(f"""
|
os.system(f"""
|
||||||
yt-dlp
|
yt-dlp
|
||||||
-c
|
-c
|
||||||
--merge-output-format mkv
|
--merge-output-format mkv
|
||||||
-o 'videos/{entry['folder-name']}/%(title)s.%(ext)s'
|
-o 'videos/{entry['folder-name']}/%(title)s.%(ext)s'
|
||||||
--extractor-args youtube:player_client=android
|
--extractor-args youtube:player_client=android
|
||||||
--throttled-rate 100M
|
--throttled-rate 100M
|
||||||
--restrict-filenames
|
--restrict-filenames
|
||||||
--download-archive alreadydownloadedonce-videos.txt
|
--download-archive alreadydownloadedonce-videos.txt
|
||||||
--match-filter "duration < 36000"
|
--match-filter "duration < 36000"
|
||||||
'{entry['url']}'
|
'{entry['url']}'
|
||||||
""".replace('\n', " ")
|
""".replace('\n', " ")
|
||||||
)
|
)
|
||||||
|
|
||||||
except yaml.YAMLError as exc:
|
except yaml.YAMLError as exc:
|
||||||
print("You fucked up the yaml format.")
|
print("You fucked up the yaml format.")
|
||||||
|
|
||||||
|
@ -1,30 +1,30 @@
|
|||||||
#!/bin/python
|
#!/bin/python
|
||||||
import yaml
|
import yaml
|
||||||
import os
|
import os
|
||||||
|
|
||||||
with open("linklist-videos.yaml", "r") as yamlfile:
|
with open("linklist-videos.yaml", "r") as yamlfile:
|
||||||
try:
|
try:
|
||||||
config = yaml.safe_load(yamlfile)
|
config = yaml.safe_load(yamlfile)
|
||||||
|
|
||||||
for entry in config:
|
for entry in config:
|
||||||
print(f"\033[92mGrabbing '{entry['url']}':\033[0m")
|
print(f"\033[92mGrabbing '{entry['url']}':\033[0m")
|
||||||
|
|
||||||
folderName = entry["folder-name"] if "folder-name" in entry else "%(uploader)s"
|
folderName = entry["folder-name"] if "folder-name" in entry else "%(uploader)s"
|
||||||
|
|
||||||
os.system(f"""
|
os.system(f"""
|
||||||
yt-dlp
|
yt-dlp
|
||||||
-c
|
-c
|
||||||
--merge-output-format mkv
|
--merge-output-format mkv
|
||||||
-o 'videos/{folderName}/%(title)s.%(ext)s'
|
-o 'videos/{folderName}/%(title)s.%(ext)s'
|
||||||
--extractor-args youtube:player_client=android
|
--extractor-args youtube:player_client=android
|
||||||
--throttled-rate 100M
|
--throttled-rate 100M
|
||||||
--restrict-filenames
|
--restrict-filenames
|
||||||
--download-archive alreadydownloaded-videos.txt
|
--download-archive alreadydownloaded-videos.txt
|
||||||
--match-filter "duration < 36000"
|
--match-filter "duration < 36000"
|
||||||
'{entry['url']}'
|
'{entry['url']}'
|
||||||
""".replace('\n', " ")
|
""".replace('\n', " ")
|
||||||
)
|
)
|
||||||
|
|
||||||
except yaml.YAMLError as exc:
|
except yaml.YAMLError as exc:
|
||||||
print("You fucked up the yaml format.")
|
print("You fucked up the yaml format.")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user