Online Sequencer Forums

Full Version: Help for rounding up <100k sequences!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
//https://onlinesequencer.net/ajax/load.php?id=1
//to
//https://onlinesequencer.net/ajax/load.php?id=100000

var https = require('https');
var fs = require('fs');
var filename = 'OSOutput-'+(new Date()).getTime()+'.lxt';
var stdin = process.openStdin();
var finalId = 100000;
stdin.addListener("data", function(d) {
var id = parseInt(d.toString().trim(), 10);
//no indent

function getUrl(id) {
    return 'https://onlinesequencer.net/ajax/load.php?id=' + id;
}

function getHttps(url, outputSuccess) {
    https.get(url, (resp) => {
            let r = '';
            resp.on('data', (chunk) => {
                r += chunk;
            });
            resp.on('end', () => {
                appendText(r, outputSuccess?'Success getting '+url:false, true);
            })
        }).on("error", (err) => {
            console.log("Error: " + err.message);
            console.log("Id: " + id);
            setTimeout(getHttps, 1000, getUrl(id), true)
    })
}

function appendText(text, message, filter) {
    if (filter) {
        var startText = `<a href=\\"\\/members\\/`;
        var start = text.indexOf(startText);
        if (start == -1) {
            editText = '';
        }
        else {
            var editText = text.slice(start + startText.length, text.indexOf(`<\\/a>, inspired`));
            var uid_name = editText.split(`\\">`);
            editText = [id, uid_name[0], uid_name[1]].join('|');
            editText = editText.split(`<\\/a>`)[0] + '\n';
        }
    }
    else {
        var editText = text;
    }
    if (message) console.log(message);
    if (!beforeMainGet(filter)) getHttps(getUrl(id), !(id % 100));
    else endMain();
    fs.appendFile(filename, editText, function (err) {
        if (err) throw err;
    });
}

function beforeMainGet(increment) {
    if (increment) {
        id++;
    }
    else {
        return true;
    }
    return (id > finalId);
}

//Start of Execution
console.log('start');
getHttps(getUrl(id), false);

function endMain() {
    //End of Execution
    console.log('end');
    return;
}

});

Ignoring my unreadable code, here are my results!
Raw data:


Quote:2|11004|camspeed01
3|3496|Void
13|1632|LucentTear
666|6660|Touhou_Music_Neko
96562|1|Jacob_
96623|731|Dragoncross99
96631|740|SirOfMonoclehaven
96635|740|SirOfMonoclehaven
96636|740|SirOfMonoclehaven
96646|741|likeuhsumbooty
96684|731|Dragoncross99
96689|731|Dragoncross99
96692|743|mcgaggen
96700|744|AfterlyfeUnicorn
96708|740|SirOfMonoclehaven
96710|741|likeuhsumbooty
96716|746|KilliBear
96719|746|KilliBear
96728|746|KilliBear
96729|746|KilliBear
96771|547|Lempillsk
96772|748|PureChoasDI
96794|697|Lkigoo
96795|697|Lkigoo
96797|742|asronome
96798|633|JHXC
96802|633|JHXC
96808|693|Rico
96831|746|KilliBear
96846|745|Dryell
96895|550|Stepson
96978|697|Lkigoo
96992|697|Lkigoo
97060|746|KilliBear
97317|746|KilliBear
97431|1|Jacob_
97433|1|Jacob_
97438|1|Jacob_
97564|693|Rico
97618|746|KilliBear
97620|746|KilliBear
97625|746|KilliBear
97645|746|KilliBear
97648|746|KilliBear
97651|746|KilliBear
97660|746|KilliBear
97669|746|KilliBear
97924|548|Jay2k
97930|548|Jay2k
97947|548|Jay2k
97948|548|Jay2k
97950|548|Jay2k
98215|693|Rico
98216|693|Rico
98340|548|Jay2k
98581|670|dukeofnachos
98649|741|likeuhsumbooty
98652|692|Ric Adbur
98656|692|Ric Adbur
98664|692|Ric Adbur
98666|693|Rico
98672|670|dukeofnachos
98690|692|Ric Adbur
98702|692|Ric Adbur
98710|692|Ric Adbur
98716|692|Ric Adbur
98721|692|Ric Adbur
98798|548|Jay2k
98800|548|Jay2k
98812|677|NotSoGoodMusic
98982|692|Ric Adbur
99062|750|Ann O. Nimous
99110|692|Ric Adbur
99137|693|Rico
99157|741|likeuhsumbooty
99234|756|MyNameIsJess
99235|756|MyNameIsJess
99238|756|MyNameIsJess
99239|756|MyNameIsJess
99242|751|SirCheesedip
99244|751|SirCheesedip
99247|751|SirCheesedip
99253|751|SirCheesedip
99280|758|Pythism
99285|759|dummy4.4
99287|751|SirCheesedip
99290|670|dukeofnachos
99333|693|Rico
99339|761|migelino64
99425|762|dacooldude
99426|762|dacooldude
99467|565|Evaglade
99483|763|Kyle Griffin
99512|763|Kyle Griffin
99528|690|BillyWAR
99536|693|Rico
99539|697|Lkigoo
99544|693|Rico
99546|697|Lkigoo
99556|764|Adaren
99558|764|Adaren
99583|690|BillyWAR
99664|766|Eric
99685|677|NotSoGoodMusic
99777|697|Lkigoo
99779|697|Lkigoo
99797|767|B34stm0de7016
99894|769|EatenAlive3
99897|769|EatenAlive3
99898|769|EatenAlive3
99902|769|EatenAlive3
99905|769|EatenAlive3
99908|769|EatenAlive3
99909|769|EatenAlive3
99929|693|Rico
99976|693|Rico
99978|771|h55genti
99984|772|Silent Bob
99985|771|h55genti
99986|693|Rico
99990|693|Rico
99997|693|Rico
99998|693|Rico


The actual list of people who are eligible:


Quote:Jacob_: 4
Dragoncross99: 3
SirOfMonoclehaven: 4
likeuhsumbooty: 4
mcgaggen: 1
AfterlyfeUnicorn: 1
KilliBear: 15
Lempillsk: 1
PureChoasDI: 1
Lkigoo: 8
asronome: 1
JHXC: 2
Rico: 15
Dryell: 1
Stepson: 1
Jay2k: 8
dukeofnachos: 3
Ric Adbur: 10
NotSoGoodMusic: 2
Ann O. Nimous: 1
MyNameIsJess: 4
SirCheesedip: 5
Pythism: 1
dummy4.4: 1
migelino64: 1
dacooldude: 2
Evaglade: 1
Kyle Griffin: 2
BillyWAR: 2
Adaren: 2
Eric: 1
B34stm0de7016: 1
EatenAlive3: 7
h55genti: 2
Silent Bob: 1


Raw data is in the format "songid|userid|username" while the actual list is in the format "username: #ofsongs". This includes any near-duplicates.
i technically have , but i uploaded it before i made an account. i'll probably get jacob to set the owner of the sequence to me
I was anonymous before becoming a user back then I used to put (by Eric) beside my titles, these still exist.
(11-20-2018, 08:20 PM)Frank Wrote: [ -> ]Ignoring my unreadable code, here are my results.

Well that's kinda neat. I'm assuming you did this to show the possible <100k sequences for the 1M sequence collab?
(11-21-2018, 05:15 PM)Kirbyderp Wrote: [ -> ]
(11-20-2018, 08:20 PM)Frank Wrote: [ -> ]Ignoring my unreadable code, here are my results.

Well that's kinda neat. I'm assuming you did this to show the possible <100k sequences for the 1M sequence collab?

yep, though I forgot a lot of people made songs before they got an account...
(11-21-2018, 05:45 PM)Frank Wrote: [ -> ]
(11-21-2018, 05:15 PM)Kirbyderp Wrote: [ -> ]
(11-20-2018, 08:20 PM)Frank Wrote: [ -> ]Ignoring my unreadable code, here are my results.

Well that's kinda neat. I'm assuming you did this to show the possible <100k sequences for the 1M sequence collab?

yep, though I forgot a lot of people made songs before they got an account...

Hmm, so I'm looking at one of the sequences () and I notice that's it's made in 2018. Is there a way to code it so that it removes any sequences that were made after 2015-05-16?
(11-21-2018, 05:49 PM)Kirbyderp Wrote: [ -> ]
(11-21-2018, 05:45 PM)Frank Wrote: [ -> ]
(11-21-2018, 05:15 PM)Kirbyderp Wrote: [ -> ]
(11-20-2018, 08:20 PM)Frank Wrote: [ -> ]Ignoring my unreadable code, here are my results.

Well that's kinda neat. I'm assuming you did this to show the possible <100k sequences for the 1M sequence collab?

yep, though I forgot a lot of people made songs before they got an account...

Hmm, so I'm looking at one of the sequences () and I notice that's it's made in 2018. Is there a way to code it so that it removes any sequences that were made after 2015-05-16?

Well, I could, but I already removed the names I suspected from the list. tl;dr I already removed the numbers below 90k