Skip to content

Instantly share code, notes, and snippets.



Last active Dec 16, 2015
What would you like to do?
Magic: the Gatheringカードメージギャラリーから@wikiフォーマットでドラフト点数表のテンプレートを作る
#!/bin/env ruby
# -*- coding: utf-8 -*-
require 'open-uri'
require 'nokogiri'
require 'pry'
doc = Nokogiri::HTML(open('' +
'Accept-Language' => 'ja,en-US;q=0.8,en;q=0.6'))
image_tags = doc.xpath('//div[@id="bycolor"]//img[contains(@src,"")]')
image_tags.each do |item|
puts "#areaedit()"
puts "*** #{item.attr('alt')}"
puts "#image(#{item.attr('src')},right)"
puts '#comment(title_msg=点数とコメント:)'
puts '#areaedit(end)'
puts '----'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.