burakgunes
Yeni Üye
- Katılım
- 12 Ağu 2021
- Mesajlar
- 65
- Çözümler
- 1
- Aldığı beğeni
- 23
- Excel V
- Office 365 TR
Kod:
# Before running the code...
# 1. Set VPN function in Opera
# 2. Download Opera Webdriver from https://github.com/operasoftware/operachromiumdriver/releases
# 3. Type about://about in Opera and get profile path and installation path.
# 4. Set the variables.
# opera_profile = r"C:\profile path"
# options._binary_location = r"C:\\installation path."
from selenium import webdriver
options = webdriver.ChromeOptions()
opera_profile = r"C:\Users\username\AppData\Roaming\Opera Software\Opera Stable"
options.add_argument('user-data-dir=' + opera_profile)
options._binary_location = r'C:\Users\username\AppData\Local\Programs\Opera\66.0.3515.103\\opera.exe'
driver = webdriver.Opera(executable_path=r'operadriver.exe',options=options)
driver.get('https://api.ipify.org/?format=json"')
html = driver.page_source
print(html)
driver.quit()
merhaba yukarıdaki kodu excel vba için uyarlamamız mümkünmüdür