Guest User

Untitled

a guest
Feb 20th, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.66 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require './cl_gems_cookies'
  3.  
  4.  agent = Mechanize.new
  5.  agent.cookie_jar.load(COOKIE_FILE)
  6.  
  7.   DB = Sequel.connect('sqlite://clublandlv.sqlite')
  8.     songs_table = DB[:songs]
  9.       song_id = DB[:songs].select_map(:song_id)
  10.  
  11.  
  12.         index = song_id
  13.         index.each do |thread_id|
  14.  
  15.           thread = agent.get("http://www.clublandlv.com/showthread.php?t=#{thread_id}")
  16.             puts "#{thread.title}"
  17.               zippy = agent.page.link_with(:text => 'download').href
  18.               posted_on =  agent.page.at(".date").text
  19.                 puts zippy
  20.                 puts posted_on
  21.                 puts
  22.        
  23.  
  24.       end
Advertisement
Add Comment
Please, Sign In to add comment