diff options
| author | Teddy Wing | 2022-06-19 02:22:14 +0200 |
|---|---|---|
| committer | Teddy Wing | 2022-06-25 13:46:38 +0200 |
| commit | b90e6dc5b4b0652340e0662f5d841d148211fcfc (patch) | |
| tree | 626a97f0b8d5ef6da5afe6a3c87012f7837a54d4 | |
| parent | 944bd268d68924f8e94ce0836f4381a5cdf3e9db (diff) | |
| download | cws-status-b90e6dc5b4b0652340e0662f5d841d148211fcfc.tar.bz2 | |
Extract extension names and publish statuses from the page
| -rw-r--r-- | cws-status | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -3,6 +3,7 @@ from urllib import request import browser_cookie3 +from lxml import html url = 'https://chrome.google.com/webstore/devconsole/<UUID>' @@ -14,4 +15,10 @@ opener = request.build_opener(request.HTTPCookieProcessor(cookie_jar)) page_html = opener.open(url).read() -print(page_html) +tree = html.fromstring(page_html) + +item_names = tree.xpath('//table[//th[text()="Item"]]/tbody/tr/td[1]/a/div//text()') +print(item_names) + +item_statuses = tree.xpath('//table[//th[text()="Item"]]/tbody/tr/td[7]/text()') +print(item_statuses) |
