from selenium import webdriver
o = webdriver.ChromeOptions()
o.add_argument('headless')
o.add_argument('disable-gpu')
o.add_argument('no-sandbox')
d = webdriver.Chrome(executable_path='/usr/local/bin/chromedriver', chrome_options = o)
d.get('http://www.google.com') # or anything...
print(d.page_source.encode()) #getting real page source here is a success.
d.close()