Selanium ile programlanan web botu nasıl shell erişimli sunucuda çalıştırılır?

BugraSahinn

Hectopat
Katılım
21 Kasım 2018
Mesajlar
53
Python ile 15 dakikada bir çekilişe katılan bir bot hazırladım fakat bunu sunucuda çalıştırmak istiyorum bu kodu nasıl düzenlemem gerek?

Python:
import undetected_chromedriver as uc
import time

for i in range(900):
 print(1)
 options = uc.ChromeOptions()
 profile = "C:/Users/bgrshn/AppData/Local/Google/Chrome/User Data/Default"
 options.add_argument(f"user-data-dir={profile}")
 driver = uc.Chrome(options=options,use_subprocess=True)
 time.sleep(2)
 
 print(2)

 driver.get("https://key-drop.com/tr/giveaways/list")
 time.sleep(3)

 driver.refresh()
 time.sleep(5)


 katil = driver.find_element("xpath",'//*[@id="giveaways-root"]/div/div/div[3]/div[2]/div[5]/div/div/div/div[2]/a')
 katil.click()
 time.sleep(7)
 katil1 = driver.find_element("xpath",'//*[@id="giveaways-root"]/div/div/div/div[2]/div[1]/div[2]/div[3]/div/button')
 katil1.click()
 time.sleep(7)
 
 print(3)
 time.sleep(899)
 driver.quit()
 
Son düzenleyen: Moderatör:
Python ile 15 dakikada bir çekilişe katılan bir bot hazırladım fakat bunu sunucuda çalıştırmak istiyorum bu kodu nasıl düzenlemem gerek?

Python:
import undetected_chromedriver as uc
import time

for i in range(900):
 print(1)
 options = uc.ChromeOptions()
 profile = "C:/Users/bgrshn/AppData/Local/Google/Chrome/User Data/Default"
 options.add_argument(f"user-data-dir={profile}")
 driver = uc.Chrome(options=options,use_subprocess=True)
 time.sleep(2)
 
 print(2)

 driver.get("https://key-drop.com/tr/giveaways/list")
 time.sleep(3)

 driver.refresh()
 time.sleep(5)


 katil = driver.find_element("xpath",'//*[@id="giveaways-root"]/div/div/div[3]/div[2]/div[5]/div/div/div/div[2]/a')
 katil.click()
 time.sleep(7)
 katil1 = driver.find_element("xpath",'//*[@id="giveaways-root"]/div/div/div/div[2]/div[1]/div[2]/div[3]/div/button')
 katil1.click()
 time.sleep(7)
 
 print(3)
 time.sleep(899)
 driver.quit()
Sorunuzu daha iyi açıklayabilir misiniz? Sunucuda derken VDS mi kast ettiniz?
 
Python ile 15 dakikada bir çekilişe katılan bir bot hazırladım fakat bunu sunucuda çalıştırmak istiyorum bu kodu nasıl düzenlemem gerek?

Python:
import undetected_chromedriver as uc.
import time.

for i in range(900):
 print(1)
 options = uc.ChromeOptions()
 profile = "C:/Users/bgrshn/AppData/Local/Google/Chrome/User Data/Default"
 options.add_argument(f"user-data-dir={profile}")
 driver = uc.Chrome(options=options,use_subprocess=True)
 time.sleep(2)

 print(2)

 driver.get("https://key-drop.com/tr/giveaways/list")
 time.sleep(3)

 driver.refresh()
 time.sleep(5)

 katil = driver.find_element("xpath",'//*[@id="giveaways-root"]/div/div/div[3]/div[2]/div[5]/div/div/div/div[2]/a')
 katil.click()
 time.sleep(7)
 katil1 = driver.find_element("xpath",'//*[@id="giveaways-root"]/div/div/div/div[2]/div[1]/div[2]/div[3]/div/button')
 katil1.click()
 time.sleep(7)

 print(3)
 time.sleep(899)
 driver.quit()

Merhaba botu çalıştırabildiniz mi / hala çalışıyor mu?
 

Technopat Haberler

Yeni konular

Geri
Yukarı