BeatStars Downloader

Used for automatically downloading BeatStars content

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
OliverP
今日安裝
0
安裝總數
1,101
評價
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")