Changeset 7597 for platform/pragger

Show
Ignore:
Timestamp:
03/07/08 00:30:18 (5 years ago)
Author:
yasuyuki
Message:

platform/pragger/Feed/nicovideo_rank.rb: 削除済み動画の判定条件が誤っていたのを修正

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/pragger/Feed/nicovideo_rank.rb

    r7595 r7597  
    3535        end 
    3636         
    37         target_time = last_fetched - (target_hour * 60 * 60 - 1200) 
     37        target_time = last_fetched - (target_hour * 60 * 60) 
    3838         
    3939        raw_items.keys.sort{|a, b| a.scan(/\d+$/)[0].to_i <=> b.scan(/\d+$/)[0].to_i}.reverse.each do |key| 
     
    4343 
    4444      # remove 'nice boat.' movie. 
    45       if raw_item['updated_at'] < last_fetched then 
     45      if raw_item['updated_at'] < (last_fetched - 3599) then 
    4646        raw_items.delete key 
    4747        next 
     
    5555    end 
    5656        end 
    57   #open( "#{config['rank_data']}.dump", 'w' ) do |f| 
    58                 #YAML.dump(raw_items, f) 
    59         #end 
     57  open( "#{config['rank_data']}.dump", 'w' ) do |f| 
     58                YAML.dump(raw_items, f) 
     59        end 
    6060        open(config['root_dir'] + last_fetched.strftime("/%Y/%m/%d/") + "rank.yaml", 'w' ) do |f| 
    6161                YAML.dump(rank_items, f)