BeatStars Downloader

Used for automatically downloading BeatStars content

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
OliverP
日安装量
0
总安装量
1,105
评分
0 0 1
版本
1.0
创建于
2021-09-28
更新于
2021-09-28
大小
6.6 KB
许可证
暂无
适用于

BeatStars Downloader

This script is used for downloading tracks from BeatStars.

How to use

  1. Go into the tracks page of the user you want to download the tracks from
  2. Click on "Load tracks" to load all available tracks of the user (the script is scrolling down automatically to do that)
  3. Click on Download and wait until it completes
  4. A modal will pop-up and allow you to copy the track names and the URLs (in a 2 line per track txt format) 5, Copy it into your downloader of choice or into the provided Python script (if using the Python script, place the copied track names and URLs into a file named tracks.txt into the same folder as the script, use Python 3 for running it)

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")