Created
April 2, 2016 14:02
-
-
Save s2terminal/930145a63655b3465e31d7716fb1172f to your computer and use it in GitHub Desktop.
Splatoonイカリングのデータを取ってテーブルにするやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [イカリング](https://splatoon.nintendo.net/)にアクセスしてログインし、コンソールで下記実行 | |
// ※イカリングはjQueryではなく[Zepto.js](http://zeptojs.com/)使用 | |
var data = {}; | |
// https://splatoon.nintendo.net/ranking | |
//$('.icon-navi-ranking').trigger('click'); | |
data['ranking'] = {}; | |
var setRankingScore = function($rankDetail, rule){ | |
var name = $rankDetail.find('.rank-username').text(); | |
var score = $rankDetail.find('.rank-score').text(); | |
if(data['ranking'][name] == undefined){ data['ranking'][name] = []; }; | |
data['ranking'][name][rule] = score; | |
}; | |
$('.ranklist-regular .rank-detail').each(function(){ | |
setRankingScore($(this), 'regular'); | |
}); | |
$('.ranklist-gachi .rank-detail').each(function(){ | |
setRankingScore($(this), 'gachi'); | |
}); | |
// https://splatoon.nintendo.net/profile | |
//$('.icon-navi-equipment').trigger('click'); | |
data['profile'] = {}; | |
data['profile']['name'] = $('.profile-username').text(); | |
data['profile']['rank'] = $('.typography-equip-rank').next('p').text(); | |
data['profile']['udemae'] = $('.typography-equip-udemae').next('p').text(); | |
data['profile']['equips'] = []; | |
$('.equip-painted-rank .equip-painted-data').each(function(){ | |
var dataEquip = {}; | |
dataEquip['image'] = $(this).find('.equip-painted-weapon-img').attr('data-retina-image'); | |
dataEquip['point'] = $(this).find('.equip-painted-point-number').text(); | |
data['profile']['equips'].push(dataEquip); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment