Created
September 21, 2017 17:23
-
-
Save t-kuni/316da533e25b4282092afd24c89b7c64 to your computer and use it in GitHub Desktop.
シャドバのカード情報を取得する
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
var name = $("#form_title").val().replace("の評価と採用デッキ", "") | |
var rarity = $(".sv_text_info tr:nth-child(3) a").text().replace("(一覧)", "") | |
var clazz = $(".sv_text_info tr:nth-child(4) a").text().replace("(一覧)", "") | |
var kind = $(".sv_text_info tr:nth-child(5) td").text() | |
var stat = $(".sv_status h3:nth-child(1) div").text().split(" ") | |
var cost = stat[0] | |
var atk = "" | |
var def = "" | |
if (stat.length > 1) { | |
atk = stat[1]; | |
def = stat[2]; | |
} | |
var kouka = $(".sv_status p").map(function() { | |
return $(this).text(); | |
}).get().join("\n") | |
console.log("%s\t%s\t%s\t%s\t%s\t%s\t%s", name, rarity, clazz, kind, cost, atk, def); | |
console.log(kouka) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment