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

Puppeteer are now restricted on certain websites? #3893

Closed
bdrtsky opened this issue Feb 2, 2019 · 10 comments
Closed

Puppeteer are now restricted on certain websites? #3893

bdrtsky opened this issue Feb 2, 2019 · 10 comments

Comments

@bdrtsky
Copy link

bdrtsky commented Feb 2, 2019

Hello. From past a half year we used Puppeteer to automate screenshots of hateful and discriminating messages and posts from certain people on several Social Media sites, like Twitter. But now this is what we have when we try to make a screenshot

example

I am not talking about any actions that require signin or any kind of Bot behavior - just a screenshot of the link!

The question is - is this some kind of sophisticated Puppeteer detection from Twitter side, or this is baked-in Puppeteer rule from now on? (I see some weird things in DevTools and it looks like it's Puppeteer limitation).

@vsemozhetbyt
Copy link
Contributor

Can this be the same issue with some https connections? #3880

@bdrtsky
Copy link
Author

bdrtsky commented Feb 2, 2019

@vsemozhetbyt looks like it! I can reproduce your issue also.

@aslushnikov
Copy link
Contributor

@bdrtsk can you please come up with any simple script that reproduces the problem? It'll help tremendously

@bdrtsky
Copy link
Author

bdrtsky commented Feb 2, 2019

@aslushnikov sure! Code is basic

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://twitter.com/kvlly/status/1091730024175161344');
  await page.screenshot({path: 'twitter-post.png'});
  await browser.close();
})();

My result of screenshot is:

twitter-post

As you can see, there's somethings going on here...

@vsemozhetbyt
Copy link
Contributor

You can just run this, open console and see many failed connections for images and CSS:

'use strict';

const puppeteer = require('puppeteer');

(async function main() {
  try {
    const browser = await puppeteer.launch({ headless: false });
    const [page] = await browser.pages();

    await page.goto('https://twitter.com/kvlly/status/1091730024175161344');
  } catch (err) {
    console.error(err);
  }
})();

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Feb 2, 2019

I am not sure if this is connected, but I've reported some similar issue just before the involved version and it was fixed just in the involved version: https://bugs.chromium.org/p/chromium/issues/detail?id=923685
Could it be that the fix somehow was not included yet?

@bdrtsky
Copy link
Author

bdrtsky commented Feb 3, 2019

@vsemozhetbyt I assume this connections are failed because of detection? I can't explain it otherwise, because from the same maschine I have no problems in regular Chrome browser...This looks pretty frustrating.

@JoelEinbinder
Copy link
Collaborator

Found the culprit: https://chromium.googlesource.com/chromium/src/+/cee722a155e623809cc241d27bdb35fe278135f4

Looks like we picked a bad Chromium revision.

@bdrtsky
Copy link
Author

bdrtsky commented Feb 5, 2019

Nice found! Hope this will be resolved.

@AlloryDante
Copy link

Nice, Thank you Joel!

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

5 participants