Changeset 8290 for platform/pragger
- Timestamp:
- 03/23/08 12:23:07 (5 years ago)
- Location:
- platform/pragger/Feed
- Files:
-
- 3 modified
-
nicovideo_feed.rb (modified) (1 diff)
-
nicovideo_find.rb (modified) (1 diff)
-
nicovideo_rank.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
platform/pragger/Feed/nicovideo_feed.rb
r8095 r8290 99 99 def save(config, items, return_items, raw_items, updated_at) 100 100 if config['cache'] then 101 oldest_cache_item = items.size > 600 && return_items[600]. link.scan(/\d+$/)[0].to_i102 cache_items = (items.size > 600) ? items.reject {|a, b| b. link.scan(/\d+$/)[0].to_i< oldest_cache_item} : items.dup101 oldest_cache_item = items.size > 600 && return_items[600].date 102 cache_items = (items.size > 600) ? items.reject {|a, b| b.date < oldest_cache_item} : items.dup 103 103 open( config['cache'], 'w' ) do |f| 104 104 YAML.dump(cache_items, f) -
platform/pragger/Feed/nicovideo_find.rb
r7973 r8290 62 62 # getting each tag pages 63 63 config['tag'].each do |tag| 64 (1.. 5).each do |count|64 (1..4).each do |count| 65 65 retry_count = 0 66 66 uri = "#{nico}tag/#{CGI::escape( tag )}?page=#{count}&sort=f" -
platform/pragger/Feed/nicovideo_rank.rb
r7992 r8290 39 39 target_time = last_fetched - (target_hour * 60 * 60) 40 40 41 raw_items.keys. sort{|a, b| a.scan(/\d+$/)[0].to_i <=> b.scan(/\d+$/)[0].to_i}.reverse.each do |key|41 raw_items.keys.each do |key| 42 42 begin 43 43 raw_item = raw_items[key]
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)