Strip3s / PhoenixBot

Phoenix Bot - A Bird Bot Resurrection
MIT License
263 stars 113 forks source link

[BUG] Does NOT log in to Target. #100

Open infowire opened 3 years ago

infowire commented 3 years ago

# Expected Behavior

Log in target.com

# Actual Behavior

Target website gets and error while logging in. Proceeds without longing in.

# Screenshots

Target

# Repro Steps

Run a usual task for target.

# Possible Fix Where is the log in link stored for target? Changing your URL to

FROM: https://login.target.com/gsp/static/v1/login/?client_id=ecom-web-1.0.0&ui_namespace=ui-default&back_button_action=browser&keep_me_signed_in=true&kmsi_default=false&actions=create_session_signin

TO: https://login.target.com/gsp/static/v1/login/?client_id=ecom-web-1.0.0&ui_namespace=ui-default&back_button_action=browser&keep_me_signed_in=true&kmsi_default=false&actions=create_session_signin&username={YOUREMAIL}

Change {YOUREMAIL} with your email for target log in.

# Desktop Configuration

# Go Around Once the browser loads, wait till it gets to the product page, click duplicate the page and log in normally. The refreshing page should be now logged in. Hopefully that works.

dsalaz04 commented 3 years ago

I got it working but the fix isn't very clean. I could look into it more but for now just open up sites/target.py and change these lines 66 and 67:

wait(self.browser, self.TIMEOUT_LONG).until(EC.presence_of_element_located((By.ID, "username"))) self.fill_and_authenticate()

to:

wait(self.browser, self.TIMEOUT_LONG).until(EC.presence_of_element_located((By.ID, "username"))) self.browser.get("https://login.target.com/gsp/static/v1/login/?client_id=ecom-web-1.0.0&ui_namespace=ui-default&back_button_action=browser&keep_me_signed_in=true&kmsi_default=false&actions=create_session_signin&username=YOUR_EMAIL") self.fill_and_authenticate()

I had to run it twice and manually click "skip" on the phone number page but it successfully logged in after that.

kennymkchan commented 3 years ago

Running into the same errors here