#๐ python automation problem
20 messages ยท Page 1 of 1 (latest)
@split pumice
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
here is full code
aik problem solve nhi ho rhi
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time
chrome_options = webdriver.ChromeOptions()
chrome_options.add_experimental_option("detach" , True)
chrome_options.add_argument("--start-maximized")
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://orteil.dashnet.org/experiments/cookie/")
cookie = driver.find_element(By.CSS_SELECTOR , "#cookie")
five_seconds = time.time() + 5
five_min = time.time() + 60
while True:
cookie.click()
if time.time() > five_seconds:
money_element = 0
money = driver.find_element(By.CSS_SELECTOR , "#money").text
if "," in money:
money_element = int(money.replace("," , ""))
print(money_element)
store_elements = driver.find_elements(By.CSS_SELECTOR , "store b")
for store_element in store_elements:
store_text = store_element.text
all_store = int(store_elements.split("-")[1].strip().replace("," , ""))
print(all_store)
if money_element > all_store:
store_element.click()
if time.time() > five_min:
cookie_sec = driver.find_element(By.CSS_SELECTOR , "cps").text
updated_cookie_sec = cookie_sec.strip(":")[1].strip()
print(updated_cookie_sec)
break
driver.quit()
@raven marsh can u help bro
no, please don't tag me
4. Use English to the best of your ability. Be polite if someone speaks English imperfectly.
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
sorry dude i just cant able to find solution so thats why i tagged u
you haven't stated what you're trying to do, or what problem you can't find the solution to
in the video i showed that the code is able to click on cookie but can able to buy in game products automatically
if your goal is just to automate cookie clicker, then you can just use the pre-built cheats that the game provides you
i know about this but the code is the assignment and i need to submit it
i can't help you any further
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
๐ python automation problem