Updated export volume info (markdown)

richard lee 2017-09-20 12:06:41 +08:00
parent ea33bfb17a
commit 14e1f1d08f

@ -8,7 +8,7 @@ import json
out = file('out.csv', 'w')
// your weed master url
# your weed master url
url = 'http://192.64.4.35:9333/'
@ -25,7 +25,7 @@ if res.status_code == 200:
soup = BeautifulSoup(res.content, 'html.parser')
for volume in soup.find('tbody').find_all('tr'):
rows = volume.find_all('td')
// use any of your weed node, I deploy openresty before my weed cluster
# use any of your weed node, I deploy openresty before my weed cluster
res = s.get("http://192.xxx.xx.xx/dir/lookup?volumeId=%s&pretty=y" % rows[0].text)
result = [a.text for a in rows[:2]]
if res.status_code == 200: