I ideally want to access the API from this website, but since I am struggling to do that, I have decided to try and scrape the page instead. I am starting at this page: https://fantasy.sixnationsrugby.com/#/welcome/login Where I plan to log in and then scrape the data.
The code I have below seems to work for every other website I test with, apart from this one. And I can't seem to pull anything, no text, forms, etc literally nothing works? As an example I just want to scrape the main header title 'Let's Go! Log in to your account'
def scrape
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
page = agent.get('https://fantasy.sixnationsrugby.com/#/welcome/login')
header_title = page.search('div.fs-box-header-title').text.strip
@output = header_title
end
Is it something to do with how the page is rendered? Thanks