您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Used for automatically downloading BeatStars content
This script is used for downloading tracks from BeatStars.
The Python script for downloads:
import urllib.request
import os
import os.path
step = 2
if not os.path.exists('Downloads'):
os.makedirs('Downloads')
with open("tracks.txt") as f:
lines = f.readlines()
for lineno, line in enumerate(lines):
if lineno % step == 1:
fname = "Downloads/"+lines[lineno-1].rstrip()+".mp3"
if not (os.path.isfile(fname)):
urllib.request.urlretrieve(line, fname)
print("Downloading "+fname)
else:
print(fname+" already downloaded, skipping")