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
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'json' | |
LDR_FULL_FEED_URL = 'http://wedata.net/databases/LDRFullFeed/items_all.json' | |
OUTFILE = 'ldrfullfeed.json' | |
REPLACE = { | |
'^http://matome\.naver\.jp/odai/[0-9]+/[0-9]+' => 'SUB', | |
'^http://matome\.naver\.jp/' => 'GEN', |
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
# -*- coding: utf-8 -*- | |
module Automatic::Plugin | |
class FilterFullFeed | |
require 'nokogiri' | |
SITEINFO_TYPES = %w[SBM INDIVIDUAL IND SUBGENERAL SUB GENERAL GEN] | |
def initialize(config, pipeline=[]) | |
@config = config |