Guest User

Untitled

a guest
May 27th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. def test6
  2. id = 90052
  3. loop do
  4. body = File.open("channel/#{id}.txt", "r").read
  5. puts body
  6. if m = body.match(/Next nothing is (\d+)/)
  7. id = m[1]
  8. else
  9. break
  10. end
  11. end
  12.  
  13. require "rubygems"
  14. require "zipruby"
  15.  
  16. c = ""
  17. Zip::Archive.open('channel.zip') do |a|
  18. a.num_files.times do |i|
  19. a.fopen(a.get_name(i)) do |f|
  20. c << f.comment if f.comment
  21. end
  22. end
  23. end
  24. puts c
  25. end
Add Comment
Please, Sign In to add comment