【VBScript】WSHについて話し合うスレ【JScript】

1デフォルトの名無しさん
垢版 |
2020/01/09(木) 07:20:41.41ID:wvbDpdNb
みんなで話し合おう
2020/02/02(日) 23:59:09.56ID:ceem9FS2
>>20
漏れは、Ruby で、Selenium WebDriver, Nokogiri などで、

Chrome, Edge などのブラウザーを自動操作して、スクレイピングする
25デフォルトの名無しさん
垢版 |
2020/02/04(火) 13:10:26.42ID:yAXtWmh5
>>24 Rubyでブラウザを動かすためのおすすめのスクリプトありますか?
2020/02/04(火) 23:08:37.00ID:89Ab/VhP
>>25
ない

       ::                .|ミ|
       ::                .|ミ|
        ::               .|ミ|           ::::::::
         :::::     ____ |ミ|          ::::
           :: ,. -'"´      `¨ー 、       ::
   ::        /   ,,.-'"      ヽ  ヽ、    ::
   ::     ,,.-'"_  r‐'"     ,,.-'"`     ヽ、 ::
   ::   /    ヾ (    _,,.-='==-、ヽ         ヽ、
   ::   i へ___ ヽゝ=-'"/    _,,>         ヽ 
   ::   ./ /  > ='''"  ̄ ̄ ̄               ヽ 
  ::   / .<_ ノ''"       ヽ               i
  ::   /    i   人_   ノ              .l
  ::  ,'     ' ,_,,ノエエエェェ了               /
    i       じエ='='='" ',              / ::
    ',       (___,,..----U             / ::
     ヽ、         __,,.. --------------i-'"  ::
      ヽ、_   __ -_'"--''"ニニニニニニニニヽ   ::
         `¨i三彡--''"´              ヽ  ::  
          /                      ヽ ::              ┼ヽ  -|r‐、. レ |
         /                     ヽ::            d⌒) ./| _ノ  __ノ
2724
垢版 |
2020/02/05(水) 00:17:51.94ID:NEouxGwD
Ruby で、Yahoo への自動ログイン

require "selenium-webdriver"

options = Selenium::WebDriver::Chrome::Options.new
options.add_option( :detach, true ) # シェルから、ブラウザを切り離す
options.add_argument( '--start-maximized' ) # 画面最大

driver = Selenium::WebDriver.for :chrome, options: options
driver.manage.timeouts.implicit_wait = 10 # default timeout

driver.navigate.to "https://login.yahoo.co.jp/config/login_verify2?.src=ym";

element = driver.find_element(:id => "username")
element.send_key "ユーザー名"

driver.find_element(:id => "btnNext").click

element = driver.find_element(:id => "passwd")
element.send_key "パスワード"

driver.find_element(:id => "btnSubmit").click
レスを投稿する

5ちゃんねるの広告が気に入らない場合は、こちらをクリックしてください。

ニューススポーツなんでも実況