phyton ile yazılmış kodları excel vba ya çevirme

Katılım
20 Ekim 2005
Mesajlar
476
s.a.

Aşağıdaki kodları nasıl vba ya çevirebiliriz.

Kod:
SCROLL_PAUSE_TIME = 1
last_height = driver.execute_script("return document.body.scrollHeight")
while True:
    # Scroll down to bottom
    driver.execute_script("window.scrollTo(0, document.body.scrollHeight)")

    # Wait to load page
    time.sleep(SCROLL_PAUSE_TIME)


    # Calculate new scroll height and compare with last scroll height
    new_height = driver.execute_script("return document.body.scrollHeight")

    # break condition
    if new_height == last_height:
        
        break
    last_height = new_height
    a= driver.find_elements_by_xpath('//*[@id="react-root"]/div/div/div/main/div/div/div/div/div/div[2]/div/section/div/div/div/div[25]/div/article/div/div[2]/div[2]/div[3]/span')
    for i in a:print(i.text)
İlgilenen üstadlara şimdiden teşekkür ederim.

Selametle......................................
 
Katılım
20 Ekim 2005
Mesajlar
476
s.a.

Yukarıdaki kodlar ile bu kodlar eşitmidir.


Kod:
last_height = a.ExecuteScript("return document.body.scrollHeight")
Do While True
   'Scroll down to bottom
    a.ExecuteScript ("window.scrollTo(0, document.body.scrollHeight)")
    a.Wait 1000
   'Calculate new scroll height and compare with last scroll height
    new_height = a.ExecuteScript("return document.body.scrollHeight")
    ' break condition
    If new_height <> last_height Then
        Exit Do
    End If
    Loop

Selametle..............................
 
Üst