プログラミンGOO

プログラミングナレッジ、ワードプレス、広告収入等について、気づき・備忘録を残していきます。

python

Python備忘録

【基本操作】 ■日時・日付 print(datetime.date.today()) #2017-11-08 print(datetime.datetime.today()) #2017-11-08 23:58:55.230546■文字列変換 str(val)■コンソール出力 print('text')改行は\n■javascriptの実行 driver.execute_script('somescript')■文…

pythonにSelenium導入備忘録

■必要なもの Firefoxウェブドライバー:Firefox公式ページ Python:Python公式ページ selenium:Pythonのpip Powershell最新版 ■パワーシェルの実行権限 win+r =>powershell set-executionpolicy remotesigned Y 上矢印キーを2回押してset-executionpolicy …

python&seleniumスクレイピング備忘録

【Selenium基本操作】 ■基本形 >|??|driver.find_element_by_属性('要素名').操作| ■webdriverの指定 driver = webdriver.Chrome()#chromeをドライバに指定 driver = webdriver.Firefox()#Firefoxをドライバに指定 ■基本メソッド .get('URL') #指定したURLに…