Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scrapeData script is not working since iRacing added a recaptcha on login page #64

Closed
gmourier opened this issue Mar 15, 2021 · 4 comments

Comments

@gmourier
Copy link

gmourier commented Mar 15, 2021

I've unsuccessfuly tested to bypass the recaptcha by using randomly generated user agents with puppeteer-extra-plugin-stealth package. Some paid solutions exists but i don't think we are in the right scope for that.

The only way to populate data was to directly reach Series page by using setCookie in puppeteer after a successfull manual login.

Here is an example.

   const page = await browser.newPage();
   const seriesUrl = 'http://members.iracing.com/membersite/member/Series.do';
   const cookies = [{
    'url': seriesUrl,
    'name': 'irsso_membersv2',
    'value': 'XXX'
  }];
  await page.setCookie(...cookies);
  await page.goto(seriesUrl);
@tmoitie
Copy link
Owner

tmoitie commented Mar 15, 2021

Weirdly I'm not seeing a captcha, although it's concerning if they plan on rolling it out to everyone. Given they've added a scraping endpoint in the latest build I had assumed that they wanted to facilitate this sort of thing.

I'm going to leave this issue open so people can see the work around if they get the issue, but for now my CI/CD tooling still seems to work so I'll leave the code as is.

@gmourier
Copy link
Author

gmourier commented Mar 15, 2021

Weirdly in fact, i've just retested on master branch and it's ok for now. Giving some tests i've made we only need irsso_membersv2 as a cookie if a workaround is needed one day.

@tmoitie
Copy link
Owner

tmoitie commented Mar 15, 2021

That's good news.

I think if I was them I would implement a captcha after a number of failed login attempts from a browser or IP address. You may have just been temporarily caught in one of those.

@gmourier
Copy link
Author

You are right @tmoitie. I think i have triggered the recaptcha because of multiple failed attempts due to a missleading space char at the end of one of my env var dedicated to the script. That's good news for sure!

@tmoitie tmoitie closed this as completed Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants