Chris Dekker
2010-Mar-09 22:37 UTC
Making Rails interract with external sites / JS processing
For some hobby project of mine I am trying to come up with a way to let a Rails application interact with some external website. I am trying to achieve the following. Lets for example take a banner on a website. Which is the easiest to explain. Banners usually are on the same spot on websites, and when you click them, you get bounced to a couple of URLs before you end up at the company''s website whos ad you clicked. I want to automate this process! Imagine the following scenario: - I tell my Rails site to click a certain link/banner on a certain (external) website. Maybe through a DOMID, maybe through XPATH, im not certain on this yet. - The server will need to retrieve / load the external page through a GET and then do another GET on the link I wanted to click. - The server needs then to follow and gather all the links that it is bounced to, before ending up at the final site. How would I achieve this using Ruby on Rails? Then there is an added problem: If we take the same example using banners again, some banners are rendered through JavaScript, such as Google Ads. The website HTML which we GET does not contain the banners, but the JS on that page tells the browser to fetch banners from Google directly. For this to work in my project I need some kind of server-side JavaScript processing scheme to make the banners show up on the server side, before we can click any links and follow their hops. Any advice is greatly appreciated! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tom Pett
2010-Mar-11 15:13 UTC
Re: Making Rails interract with external sites / JS processing
Bump... Anyone? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.