Skip to content

Instantly share code, notes, and snippets.

import requests
import time
import os
# --- # --- # --- # --- #
userID1 = 1 # replace
userID2 = 2 # replace
# --- # --- # --- # --- #
@Shiroizu
Shiroizu / notifs.py
Last active December 14, 2019 10:43
VocaDB song notification songlist -creator
import datetime
import requests
userID =
login = {
'UserName': 'user',
'password': 'pass'
}
javascript:void function(){javascript:(async function(){"use strict";const CONFIG={delay:200,filters:{minViews:1,skipTitlesWith:["on vocal","off vocal","\u30CB\u30B3\u30AB\u30E9"]},colors:{add:"#b0e8fc",existing:"#8ef990"},baseUrl:"https://vocadb.net"},sleep=ms=>new Promise(resolve=>setTimeout(resolve,ms)),createButton=(text,color,href)=>{const btn=document.createElement("a");return btn.textContent=text,btn.href=href,btn.target="_blank",btn.addEventListener("click",e=>{e.stopPropagation()}),Object.assign(btn.style,{backgroundColor:color,color:"black",padding:"7px 14px",border:"1px solid black",textDecoration:"none",display:"inline-block",marginLeft:"10px",marginTop:"5 px",width:"70px"}),btn},addButtonToElement=(button,videoId)=>{let position=`a[href="/watch/${videoId}"]`,element=document.querySelector(position);if(!element&&(console.log(`First position attempt failed for video id: ${videoId} and position: ${position}`),position=`a[href="https://www.nicovideo.jp/watch/${videoId}"]`,element=document.querySelect
import datetime
import requests
userID =
login = {
"UserName": "",
"password": ""
}
# Outputs a list of artists based on rated songs by the user (sorted by total song score).
# Useful for finding more artists to follow.
# Output example
'''
Favs Likes Name URL
10 2 オカメP https://vocadb.net/Ar/87
5 2 まらしぃ https://vocadb.net/Ar/494 (not following)
3 4 *Luna https://vocadb.net/Ar/1620 (not following)
import requests, json, time, os
# Recheck files containing Niconico links (to see if a song entry exists on VocaDB)
# Accepted line formats:
# http://www.nicovideo.jp/watch/sm42561422 13161 サマーリウム feat.小春六花
# http://www.nicovideo.jp/watch/sm42561422
# sm42561422
event_id =
file_dir = ""
; Download https://www.autohotkey.com/download/ahk-v2.exe
; The correct tab must be open (https://vocadb.net/playlist)
; Window minified or fully open
browser := "Firefox"
; "Chrome" works as well
coords := "x1000 y1000"
; Verify the correct "Mouse Position" (Screen) using "AutoHotkey Window Spy"
''' Output (sorted by date):
λ "VocaDB Wiki revision history.py"
Found 77 pages
2024-01-03 10:22:51+00:00: wiki/59 'Content policy' (version 28) edit by Shiroizu
2024-01-01 13:54:17+00:00: wiki/86 'Album entry editing' (version 11) edit by Shiroizu
2024-01-01 13:54:02+00:00: wiki/83 'Artist entry editing' (version 19) edit by Shiroizu
2024-01-01 13:53:30+00:00: wiki/89 'Song entry editing ' (version 19) edit by Shiroizu
...
2023-02-16 03:32:05+00:00: wiki/53 'Management guidelines / golden rules' (version 24) edit by andreoda
import requests
import time
user_id =
page = 1
save_file = f"Rated songs by user {user_id}.txt"
all_song_ids = []
while True:
import random
# Merges rated songs with new songs while preferring more recent songs
""" Example output
5 new songs
9 rated songs
Weights: [1.0, 0.5, 0.333 ... 0.143, 0.125, 0.111]