seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
5.32k stars 977 forks source link

Direct.playstation.com detecting Selenium (403 on login) #3192

Closed adri1336 closed 2 weeks ago

adri1336 commented 2 weeks ago

Hi, this is my code:

from seleniumbase import SB
import time

user = 'user'
password = 'password'

def main():
    with SB(uc=True, incognito=True, locale_code='es-ES') as sb:
        sb.open(
            'https://direct.playstation.com/')
        # Accept cookies
        sb.click('#_evidon-accept-button')

        # Press 'Login' button
        sb.click('.icon-wrapper.js-topnav-desktop-signin-link')

        # Fill in the email field
        sb.press_keys('#signin-entrance-input-signinId', user + '\n')

        # Fill in the password field
        sb.press_keys('#signin-password-input-password', password + '\n')

        time.sleep(10)

if __name__ == '__main__':
    main()

image

And getting some errors in network: image image

It's like some with 'https://reporting.cdndex.io/error' related

Any things to do?

mdmintz commented 2 weeks ago

Follow the example in SeleniumBase/examples/raw_antibot_login.py for bypassing bot-detection on a site with real-time bot-scanning. (You'll need to use the PyAutoGUI methods from a disconnected UC Mode state in order to bypass detection.)

adri1336 commented 2 weeks ago

It is detected even with Uc disconnected mode

mdmintz commented 2 weeks ago

Then it's blocking on IP Address / Geolocation. When I went to https://direct.playstation.com/ with a regular Selenium browser, there was no block.