dominikh changed the topic of #cinch to: The IRC Framework | Latest version: Cinch 2.1.0
rikai has quit [Remote host closed the connection]
rikai has joined #cinch
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
CM-Punk has quit [Ping timeout: 240 seconds]
Azure has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
Zackio has quit [Ping timeout: 264 seconds]
Quintasan has left #cinch [#cinch]
Zackio has joined #cinch
Zackio has quit [Ping timeout: 264 seconds]
pingularity has joined #cinch
pingularity has quit []
<Gizmokid2005> can anyone direct me to why, when using the example google.rb plugin or bot itself this error is thrown when using "!google cinchbot" https://gist.github.com/Gizmokid2005/a425c6e23ab572868b24 ?
<catepillar> Gizmokid2005: where is this bot currently running?
<Gizmokid2005> catepillar: I feel daft asking, but what do you mean? As in the code running, what IRC is he running on, etc?
<catepillar> what server
<catepillar> i should have been more clear
<Gizmokid2005> here, #gizmokid2005
<Gizmokid2005> and no worries
<Gizmokid2005> by here I clearly mean irc://irc.freenode.org/#gizmokid2005
<catepillar> im willing to bet that google's search results have changed
<Gizmokid2005> well, that was my thought
<catepillar> that code is from 2010
<Gizmokid2005> however, other searches work just fine still
<Gizmokid2005> just cinchbot does that
<Gizmokid2005> cinch was spotty at first, but that seems to work
<catepillar> other searches?
<catepillar> OH
<Gizmokid2005> and most other terms seem to function just fine
<Gizmokid2005> yeah
<catepillar> i remember this issue
<Gizmokid2005> oh?
<catepillar> stupid google claims their page is utf-8
<catepillar> but it isn't always
<catepillar> the text blurbs they have can (and sometimes) encoded in different ways
<catepillar> nokogiri is very picky about it
<catepillar> i don't remember the work around for it
<Gizmokid2005> likely when it's suggesting something with a" did you mean" message
<Gizmokid2005> But that doesn't seem to be correct. It seems to be /mostly/ random, which definitely supports the "meh, utf-8 maybe" idea
<catepillar> no, it's likely the character encodings from the link descriptions
<Gizmokid2005> Sadly, I don't see a google search api, it seems that parsing the webpage is how it should be done.
<catepillar> that's correct
<catepillar> google killed the search api so you could see their ads :P
<Gizmokid2005> can't say I'm surprised...not anymore.
<catepillar> yea, the xpath is still all the same
<catepillar> i would look into that
<Gizmokid2005> thanks catepillar
<Gizmokid2005> would it be worth putting any of this into the example?
<catepillar> you could submit a PR
<catepillar> im pretty sure dominikh would accept something that minor
<Gizmokid2005> sure. If I can wrap my head around it I'll definitely do that.
<Gizmokid2005> thanks again catepillar
<catepillar> np
<catepillar> i figured out what character is screwing up that particular search result
<catepillar> there is a bit that looks like "Inherits: User. Object; Target · User;"
<Gizmokid2005> I tried to give it a cursory look but didn't find anything.
<catepillar> in between teh target user is a weird dash
<catepillar> that is probalby some ISO variant
<Gizmokid2005> I see that...
<Gizmokid2005> huh
<catepillar> it comes down to nokogiri forces utf-8 on documents
<catepillar> which is not the proper behavior
<Gizmokid2005> it looks like changing this line from this: res = Nokogiri::HTML(open(url)).at("h3.r") to this: res = Nokogiri.parse(open(url.to_s).read).at("h3.r") forces the encoding (or at least works around the issue)
<catepillar> hmm, good to know
<Gizmokid2005> it's definitely corrected the issue in the searches I've found with that issue
<Gizmokid2005> I'll submit a quick PR for it.
<Gizmokid2005> catepillar: https://github.com/cinchrb/cinch/pull/168 <-- thanks again for the help
postmodern has joined #cinch
CM-Punk has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
Azure has joined #cinch
postmodern has quit [Quit: Leaving]
rikai has quit [Ping timeout: 240 seconds]
rikai has joined #cinch
djbkd has joined #cinch
rikai has quit [Ping timeout: 264 seconds]
dominikh has quit [Ping timeout: 240 seconds]
dominikh has joined #cinch
rikai has joined #cinch
djbkd has quit [Remote host closed the connection]
rikai has quit [Ping timeout: 240 seconds]
djbkd has joined #cinch
rikai has joined #cinch
djbkd has quit [Remote host closed the connection]
irsol_ has joined #cinch
irsol has quit [*.net *.split]
Rylee has quit [*.net *.split]
rikai has quit [Read error: Connection reset by peer]
rikai has joined #cinch
Rylee has joined #cinch
rikai has quit [Read error: Connection reset by peer]
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
irsol_ has quit [Changing host]
irsol_ has joined #cinch
irsol_ is now known as irsol
rikai has joined #cinch
irsol has quit [Remote host closed the connection]
irsol has joined #cinch
Azure has quit [Read error: Connection reset by peer]
Azure has joined #cinch
irsol_ has joined #cinch
catepill1r has joined #cinch
djbkd has joined #cinch
irsol has quit [*.net *.split]
Dwarf has quit [*.net *.split]
catepillar has quit [*.net *.split]
skybotalpha has quit [*.net *.split]
Netfeed has quit [*.net *.split]
catepill1r is now known as catepillar
Netfeed has joined #cinch
rikai has quit [Ping timeout: 240 seconds]
rikai has joined #cinch
irsol_ has quit [Changing host]
irsol_ has joined #cinch
irsol_ is now known as irsol
rikai has quit [Ping timeout: 245 seconds]
rikai has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]
rikai has quit [Ping timeout: 240 seconds]
rikai has joined #cinch
Zackio has joined #cinch
djbkd has joined #cinch
djbkd has quit [Remote host closed the connection]