Skip to content

Instantly share code, notes, and snippets.

@suna-pan
Created January 8, 2015 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suna-pan/d1583743b1ce30f4e076 to your computer and use it in GitHub Desktop.
Save suna-pan/d1583743b1ce30f4e076 to your computer and use it in GitHub Desktop.
mikutter_inmu_filter
# -*- coding: utf-8 -*-
require 'rexml/document'
require 'open-uri'
Plugin.create(:mikutter_inmu_filter) do
filter_show_filter do |msgs|
msgs = msgs.select do |item|
if item.to_s =~ /(sm\d+)/
video = "http://i.nicovideo.jp/v3/video.array?v=" + $1
doc = REXML::Document.new(open(video))
if doc.to_s.include?('真夏の夜の淫夢')
false
else
item
end
else
item
end
end
[msgs]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment