This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client = RedditKit::Client.new 'myredditusername', 'myredditpassword' | |
client.signed_in? | |
Error message: | |
RedditKit::RequestError in PagesController#home | |
RedditKit::RequestError | |
Ive also tried. | |
RedditKit.sign_in 'myredditusername', 'myredditpassword' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="siteContainer"> | |
<div class="alltheInfo" > | |
<p>This is the AUDIOMACK NEWS for today</p><br /> | |
<%= @news_links.each do |x| %> | |
<%= x.text %><a href='<%= x.attr('href') %>'><%= "link" %></a><br /> | |
<% end %> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="container"> | |
<a href='<%= @hnhh.first.href %>'><%= @hnhh[0] %></a> | |
<br /> | |
<br /> | |
<% @hnhh[41..326].each do |link| %> | |
<a href='<%= link.href %>'><%= link %></a><br /> | |
<% end %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MainController < ApplicationController | |
require 'rubygems' | |
require 'mechanize' | |
require 'open-uri' | |
def home | |
end | |
def datapages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'mechanize' | |
require 'open-uri' | |
class Hnhh | |
url = 'http://www.hotnewhiphop.com/archive/' | |
agent = Mechanize.new | |
page = agent.get(url) |