GAS Library | Html parse for web scraping

How to add

You can add this library by the key below. (for legacy script editor)

MJqa3Uidm9a8fNR_0snRPwKWZ8rqdjnSl

if you want to know how to use this key , please check  this guidance.

How to use

1. Get html text by UrlFetchApp, PhantomJsCloud (if require script running to get html) or other tools.

2. make Html class by the html text like below.
(insert html text string to argument.)

3. use Html class methods and get Element you want to reach.
(insert XPath string to argument. for example: ‘/body/div/header[1]/div’)

4. use Element class methods and get detail of this Element.

Class Html

Access all Elements included in this Html.

[table “” not found /]

Class Element

Get detail of this Element and access all Elements locate directly under this Element.

[table “” not found /]

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です