nokogiri showing old information

7 views
Skip to first unread message

A Y

unread,
May 27, 2012, 5:15:21 PM5/27/12
to nokogiri-talk
I'm not quite sure if this is a nokogiri problem, a ruby problem,
siriproxy problem or something on the end of the site I'm trying to
scrape.

I'm using ruby + nokogiri to write siriproxy plugins that scrapes
websites for sports scores. However, the most recent information I
get is the information at first run/time of bundling. IE scores won't
update. I'm putting all of the different pieces of info that I parse
into an OpenStruct deal but yeah. I notice that this only happens
with the sports scores plugins I wrote (from ESPN) but not with my
reddit one which makes me think that it's a site specific issue but
I'm trying all avenues. If you can help me or need more information,
please let me know!! Thanks!

Tim Diggins

unread,
May 28, 2012, 5:20:41 AM5/28/12
to nokogi...@googlegroups.com
It's almost definitely not a nokogiri problem. Nokogiri is using the open-uri lib (in fact you must be having to require it in your script) to open the document. Nokogiri won't be doing the caching of that document (if indeed anything on the ruby side is).

This is going off-topic but... I'd recommend using an easy a transparent debugging proxy like Charles (http://www.charlesproxy.com/)  to inspect when and what and how you are accessing external resources via your code.

Tim

Mike Dalessio

unread,
May 29, 2012, 8:01:44 AM5/29/12
to nokogi...@googlegroups.com
Without understanding how you are downloading the HTML, I can only advise you that you're probably retrieving a cached version.

Nokogiri does not handle internet connectivity. I don't know what package you're using to do so. You may want to try Mechanize, which wraps Nokogiri in a loving, web-aware, embrace.

HTH,
-m

Reply all
Reply to author
Forward
0 new messages