Python Libraries

WayScript is running Python 3.7

Add a Python Library

If you need a Python library that isn't currently available, you can declare additional requirements in the "Requirements" field of the Python module. (See Adding Additional Requirements.)

Using Selenium

The Python module includes the Chrome headless browser, which you can interact with using selenium. Here is some sample code to do this:

from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0')
browser = webdriver.Chrome(options = options)
browser.set_page_load_timeout(10)
browser.get('https://wayscript.com/')
ps = browser.page_source
print(ps)
browser.close()

Available Python Libraries