[TOC]
- news.yaml
ua: Chrome/55.0.2883.87
cookies: {}
login: !include login.yaml
list: !include list.yaml
each:
- get
- log
- &username username
- &password password
- login.yaml
get: https://www.baidu.com
-
select: '#username'
typein: *username
-
select: '#password'
typein: *password
-
click: '#login'
- list.yaml
get: https://news.baidu.com?pn=*pn
-
select: '.hotnews>ui>ul a'
yield: href
if: pn<100
again:
- set: pn+=20