Last active
July 23, 2019 13:42
-
-
Save manuzhang/62134b2d3a89a7686d7dd7dd556a7834 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $ivy.`org.seleniumhq.selenium:selenium-chrome-driver:3.0.1` | |
import org.openqa.selenium.JavascriptExecutor | |
import org.openqa.selenium.chrome.{ChromeDriver, ChromeOptions} | |
System.setProperty("webdriver.chrome.driver", "/Users/doriadong/bin/chromedriver") | |
val options = new ChromeOptions() | |
options.addArguments("--proxy-server=http://127.0.0.1:1087") | |
val driver = new ChromeDriver(options) | |
driver.get("https://overcast.fm/+E6UAAGfPU") | |
val jse = driver.asInstanceOf[JavascriptExecutor] | |
println(jse.executeScript( | |
"return document.getElementById('audioplayer').duration")) | |
driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment