Skip to main content
DameDaNeSpace

H3

H3's avatar

I do computery stuff!

he/him
19 years old
Germany

Last Login:

View: Profile | Blog

H3's interests
General Electronics, Programming, Microcontrollers, Computers. That sort of stuff.
Music Idunno i like most stuff. DnB stuff, jungle stuff, Tracker stuff, other stuff... just look at my ListenBrainz. Stuff includes: Deathbrain, jam2go, DV-i, optic core, Lena Raine, dr1ft, Adam F, C418, cvrsed, Fearofdark, Availax, Pikaro, and lots more
Movies uuh idk not many... Ghost in the Shell looks cool, The Studio Ghibli Stuff is good, perfect blue is interesting...
Television Random stuff. Anime is cool too i guess. Stuff in no particular order: Infinity Train, Evangelion, Erased, Death Note, Cowboy Bebop, 86: Eighty Six, SPYxFAMILY, Steins;Gate, and lots that i have forgotten right now.
Games I don't play that much stuff. Unreal Tournament 1999, ChilloutVR, Minecraft, Half-Life, and some other stuffs.
Books Audiobooks are neat. Project Hail Mary, and some stuff from when i was younger that probably nobody here knows but i still like.

DDS Notifications Script

I present to you:

  • 4 Generations of adapting to different MySpace clones
  • not fully tested
  • may blow your pc up

the
NOTIFICATION SCRIPT!!!

import json
import requests
import time
from playsound import playsound

user_id = "23" #Enter you user IDs here. Put them in quotes and seperate them by commas
session_cookie = "nope" #enter the value of the 'session' cookie (BE CAREFUL! THIS CAN BE USED TO COMPROMISE YOUR ACCOUNT

last_state = False

def check():
    try:
        r = requests.get('https://damedanespace.com/u/'+user_id+'/user.json', cookies={'session' : session_cookie})
    except requests.exceptions.ConnectionError:
        print("ConnectionError")
        return
    except:
        print("Error")
        return
    
    user = make_json_request(r)
    
    if user == False:
        print("API Error")
        return
    
    try:
        notifs = user['notifications']
    except:
        print("you probably need to renew your session cookie in the script");
    
    changes_exist = False
    
    #print("For " + user_id + ": ")
    print("For " + user['name'] + ":")

    if notifs['friendrequests'] == True:
        print("You have new fwiend requests!")
        changes_exist = True
        
    if notifs['friends'] == True:
        print("You have new friends!")
        changes_exist = True

    if notifs['mail'] == True:
        print("You have unread messages!")
        changes_exist = True

    if notifs['comments'] == True:
        print("You have new comments!")
        changes_exist = True

    if changes_exist == False:
        print('Nothing new')
    
    global last_state
    
    if changes_exist and not last_state:
        playsound("notify.wav")
    
    last_state = changes_exist
    
    print("")
    

def make_json_request(request):
    json = request.json()
    if json["error"] != None:
        print("ERROR: " + json["error"])
        return False
    else:
        return json

while True:
    check()
    time.sleep(3)
Comments
H3
H3's avatar

i added a bit of CSS so its a little easier to copy

ilikebreadtoomuch
ilikebreadtoomuch's avatar

should have put it in a pastebin or smth