12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- from selenium import webdriver
- from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
- import time
- import os
- import datetime
- import urllib.parse
- from selenium.webdriver.support.ui import WebDriverWait
- from selenium.webdriver.common.by import By
- from selenium.webdriver.support import expected_conditions as EC
- import codecs
- import random
- from bs4 import BeautifulSoup
- import requests
- import time
- import rpyc
- import sys
- import docker
- import googlesearch
- import codecs
- import sys
- import time
- import dataset
- import os
- options = webdriver.ChromeOptions()
- options.add_argument("start-maximized")
- options.add_argument('user-data-dir=/opt/user')
- #options.add_argument('--profile-directory=Default')
- #options.add_argument('--profile-directory=Profile 1')
- #options.add_argument('--profile-directory=Profile 2')
- #options.add_argument('--profile-directory=Profile 3')
- #options.add_argument('--profile-directory=Profile 4')
- #options.add_argument('--profile-directory=Profile 5')
- #options.add_argument('--profile-directory=Profile 7')
- options.add_argument('--profile-directory=Profile 8')
- driver = webdriver.Remote(
- command_executor='http://127.0.0.1:4444/wd/hub',
- desired_capabilities=options.to_capabilities())
- driver.get('https://www.yahoo.com.tw')
- time.sleep(99999)
- #driver.set_window_size(1400,1000)
|