Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doc.css("#cat10 #forum46").each do |grab|
- genre = grab.at_css(".forumtitle").text
- subgenre = grab.css(".subforum a").text
- puts "#{genre}"
- puts
- puts "#{subgenre}"
- end
- That code grabs the forum title, and all of the subforum titles under it. It returns them on one line
- without spaces. Tried to add a \n to
- puts "#{subgenre}\n"
- Which did not work. Also tried to add the \n up top in the subgenre variable. How can I get the results to print separately?
Advertisement
Add Comment
Please, Sign In to add comment