pikesaku’s blog

個人的な勉強メモです。記載内容について一切の責任は持ちません。

2019-04-01から1ヶ月間の記事一覧

Webスクリピングサンプルコード

Web

大変だった。。。待機が重要。 # -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_co…

Xpathのパス指定メモ

Web

パス省略(//)は複数使ってもOK? サンプルコード # -*- coding: utf-8 -*- from lxml import html a = """ <html> <head> <title>Sample</title> </head> <body> <div> <h1 class="title1">Sample #01</h1> </div> <div> <h1 class="title2">Sample #02</h1> </div> <div> <h1 class="title3">Sample #03</h1> </div> </body> </html> """ prin…