sniffingpickles / Auto-Amazon-Giveaways

Automated Amazon Giveaways using Python3 & Pyppeteer :gift: :snake:
6 stars 8 forks source link

Verification needed #12

Closed nomisunrider closed 6 years ago

nomisunrider commented 6 years ago

After it logs in to Amazon, I see it gets a prompt from Amazon to email me a verification code that needs to be verified. To get around this, can an option be added to use a different browser profile directory?

sniffingpickles commented 6 years ago

turn off all 2fa stuff

dziban303 commented 6 years ago

This also happens if you try to run the bot while on a VPN. If you use a VPN, turn it off when running the bot, or set up an exception.

On Tue, Jul 31, 2018 at 1:18 PM Evan H notifications@github.com wrote:

turn off all 2fa stuff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sniffingpickles/Auto-Amazon-Giveaways/issues/12#issuecomment-409318640, or mute the thread https://github.com/notifications/unsubscribe-auth/AHkHdeePycleqqPe_KftjmGDqGqkD0iRks5uMJ9ugaJpZM4Vowmd .

nomisunrider commented 6 years ago

I do not have two-factor enabled and am not on a VPN. It states it is because I am signing in from a new device

image

sniffingpickles commented 6 years ago

If you're on windows, right click the chromium task on the start menu, and click the Chromium application. That way it opens a new unattached browser session of chromium. Log in and verify your stuff. If that doesn't work, double check you don't have any alert settings here:

https://www.amazon.com/a/settings/approval

nomisunrider commented 6 years ago

I'm on linux. I think the issue is that when python launches chromium, it does not have any browsing history or cookies for amazon, so detects it as a new device.

Regarding that link, I have nothing setup for 2FA. I see this:

image

sniffingpickles commented 6 years ago

My best advice is to try and figure out how to log in via chromium at least once, as mentioned before. Then amazon may think you're just logging in normally.

nomisunrider commented 6 years ago

I figured out a way around it.
As suggested, I had to login once with a verification code, but there is no way to launch the pypeteer chromium easily on linux (that i can find). I threw the below together and was able to login once, so now it no longer gets the verification prompt. It must have stored a cookie "somewhere."

`import asyncio from pyppeteer import launch

async def main(): browser = await launch({'headless': False}) page = await browser.newPage() await page.goto('http://amazon.com') await page.waitFor(300000); asyncio.get_event_loop().run_until_complete(main()) `