Updated to work with Dicks sporting goods, in a limited way

Dicks
Julie 5 years ago
parent 4aa07b7942
commit 5a1645c415
Signed by: cobular
GPG Key ID: 8CAB39FC9A8F13FB

@ -0,0 +1,28 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="main" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
<module name="NikeBot" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
<env name="USERNAME1" value="nike1@cobular.com" />
<env name="PASSWORD1" value="turt8SEE-sqer_kat" />
<env name="USERNAME2" value="covere715@gmail.com" />
<env name="PASSWORD2" value="AASU5cDyl73o" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/main.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

@ -62,25 +62,26 @@ class Worker(object):
)
def login(self):
driver = self.driver
driver.implicitly_wait(5)
driver.get("https://www.nike.com/login")
driver.find_element_by_css_selector("input[autocomplete='email']").send_keys(self.username)
driver.find_element_by_css_selector('input[autocomplete="current-password"]').send_keys(self.password)
driver.find_element_by_css_selector('input[value="SIGN IN"]').click()
success = False
while not success:
time.sleep(2)
try:
driver.implicitly_wait(1)
driver.find_element_by_css_selector('input[value="Dismiss this error"]').click()
driver.implicitly_wait(5)
driver.find_element_by_css_selector('input[autocomplete="current-password"]').send_keys(self.password)
driver.find_element_by_css_selector('input[value="SIGN IN"]').click()
except:
success = True
self.driver.get("https://www.dickssportinggoods.com/")
# driver = self.driver
# driver.implicitly_wait(5)
# driver.get("https://www.nike.com/login")
# driver.find_element_by_css_selector("input[autocomplete='email']").send_keys(self.username)
# driver.find_element_by_css_selector('input[autocomplete="current-password"]').send_keys(self.password)
# driver.find_element_by_css_selector('input[value="SIGN IN"]').click()
# success = False
# while not success:
# time.sleep(2)
#
# try:
# driver.implicitly_wait(1)
# driver.find_element_by_css_selector('input[value="Dismiss this error"]').click()
# driver.implicitly_wait(5)
# driver.find_element_by_css_selector('input[autocomplete="current-password"]').send_keys(self.password)
# driver.find_element_by_css_selector('input[value="SIGN IN"]').click()
# except:
# success = True
# if driver.find_element_by_css_selector()
def go(self):
@ -88,8 +89,7 @@ class Worker(object):
driver.implicitly_wait(2)
logging.info(f"Starting on thing")
driver.get("http://lumtest.com/myip.json")
time.sleep(100)
time.sleep(10000)
logging.error("Uh oh, I made it too far!")

@ -10,7 +10,8 @@ from src.logger import listener_process, listener_configurer, worker_configurer
def setup_logins_ports():
manager = Manager()
shared_ip_list = manager.list([24000, 24000, 24000, 24001, 24001, 24001])
shared_ip_list = manager.list(
[24000, 24001, 24002, 24003, 24004, 24000, 24001, 24002, 24003, 24004, 24000, 24001, 24002, 24003, 24004])
login_list = manager.list([
{"name": "johnpeter", "un": getenv("USERNAME1"), "pw": getenv("PASSWORD1")},
{"name": "johnpeter", "un": getenv("USERNAME1"), "pw": getenv("PASSWORD1")},

Loading…
Cancel
Save