[dLtMs0 v 5.4] ITT SHINJI IS CONFIRMED FOR GROSSEST; Days till Pokestick Day: check new thread

Status
Not open for further replies.
135

Wittle White Butterflies.

Spoiler:

Thank you for deciphering moonrunes for Vanilla.
 
Thank you for deciphering moonrunes for Vanilla.

Gonna use this opportunity to express my dissatisfaction with the way so many people in this particular context use the word "vanilla" to convey something very far from what it actually means.
For some reason it's really triggering me. It was actually one of the big reasons why I left that one site with the legal monopoly and the fast page loads.

136
 
Gonna use this opportunity to express my dissatisfaction with the way so many people in this particular context use the word "vanilla" to convey something very far from what it actually means.
For some reason it's really triggering me. It was actually one of the big reasons why I left that one site with the legal monopoly and the fast page loads.

137

Well, it's the more accepted term for the genre.

Not that I'm going to get into talks about such things.

Ohh...that is some interesting Norigami's.
 
146.

Goodness was this the most awkward thing I've ever written. Nico Nico's API is so troublesome.

@machomuu

Code:
var id = process.argv[2] || process.exit(),
	session = process.argv[3],
	fs = require('fs'),
	request = require('request'),
	nv = new (require('node-nicovideo'))();

nv.login('[email protected]', 'password', function(err, login) {
	var cookieheader = {
		Cookie: 'nicosid=' + login.nicosid + ';user_session=' + login.user_session + ';'
	}
	nv.getthumbinfo(id, 'json', function(err, body, res) {
		var video = body.nicovideo_video_response.video_info[0].video[0];
		fs.createWriteStream('./meta').write('https://nicovideo.jp/watch/' + video.id + '\n\n'
			+ '【】【】【】' + '\n\n'
			+ video.title + '\n\n'
			+ '[romaji]' + '\n\n'
			+ '[eigo]' + '\n\n'
			+ video.description[0].replace(/\<br \/\>/g, '\n') + '\n\n'
			+ '[uta-wiki]' + '\n');
		nv.getflv(id, login.nicosid, login.user_session, function(err, res) {
			var vurl = res.url;
			console.log(vurl);
			request({
				uri: 'https://nicovideo.jp/watch/' + video.id,
				headers: cookieheader
			}, function(err, res) {
				cookieheader.Cookie += unescape(res.headers['set-cookie'][0]).match(/nicohistory=.*?;/)[0];
				//console.log(cookieheader.Cookie);
				var smile = fs.createWriteStream('smile.mp4');
				var req = request({
					uri: vurl,
					headers: cookieheader
				}, function(err, res) {

				});
				req.on('response', function(res) {
					console.log('\n');
					var start = process.hrtime()[0],
						len = parseInt(res.headers['content-length'], 10),
						elapsed,
						down = 0,
						line;
					//console.log(len);
					//fs.createWriteStream('header.log').write(JSON.stringify(res));
					req.pipe(fs.createWriteStream('smile.mp4'));
					req.on('data', function(data) {
						elapsed = process.hrtime()[0] - start;
						down += data.length;
						line = (down / len * 100).toFixed(2) + '%\t' + (down / elapsed / 1024).toFixed(2) + 'kbps\t' + elapsed + 's';
						process.stdout.clearLine();
						process.stdout.cursorTo(0);
						process.stdout.write(line);
					})
					.on('close', function() {
						console.log('Finished.');
					});
				});
				
			});
		});
	});
});
 
Status
Not open for further replies.
Back
Top