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: (async function () {const o={delay:200,filters:{minViews:1,skipTitlesWith:["on vocal","off vocal","ニコカラ"]},colors:{add:"#b0e8fc",existing:"#8ef990"},baseUrl:"https://vocadb.net"},e=o=>new Promise(e=>setTimeout(e,o)),t=(o,e,t)=>{const i=document.createElement("a");return i.textContent=o,i.href=t,i.target="_blank",i.addEventListener("click",o=>{o.stopPropagation()}),Object.assign(i.style,{backgroundColor:e,color:"black",padding:"7px 14px",border:"1px solid black",textDecoration:"none",display:"inline-block",marginLeft:"10px",marginTop:"5 px",width:"70px"}),i},i=(o,e)=>{let t=`a[href="/watch/${e}"]`,i=document.querySelector(t);if(!i&&(console.log(`First position attempt failed for video id: ${e} and position: ${t}`),t=`a[href="https://www.nicovideo.jp/watch/${e}"]`,i=document.querySelector(t),!i&&(console.log(`Second position attempt failed for video id: ${e} and position: ${t}`),t=`a[href="watch/${e}"]`,i=document.querySelector(t),!i)))throw new Error(`No position found for video id: ${e} and positi
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]