git config --global --add http.sslVersion tlsv1.2
// compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support:appcompat-v7:27.0.0'
mavenLocal()
mavenCentral()
maven { // <-- Add this
url 'https://maven.google.com/'
name 'Google'
}
maven {
url "https://maven.google.com"
}
http://server01:9090/api/v1/query_range?query={__name__=%22node_filesystem_avail%22,instance=%22server01:9100%22,mountpoint=%22/data%22}&start=2017-12-15T11:10:30.781Z&end=2017-12-15T11:17:00.781Z&step=15s
from bs4 import BeautifulSoup
content_table = """
<table>
<thead>
<th>ID</th>
<th>Vendor</th>
<th>Product</th>
</thead>
<tr>
<td>1</td>
<td>Intel</td>
<td>Processor</td>
</tr>
<tr>
<td>2</td>
<td>AMD</td>
<td>GPU</td>
</tr>
<tr>
<td>3</td>
<td>Gigabyte</td>
<td>Mainboard</td>
</tr>
</table>
"""
soup = BeautifulSoup(content_table, 'html.parser')
headers = {}
rows = soup.find_all("tr")
thead = soup.find("thead").find_all("th")
for i in range(len(thead)):
headers[i] = thead[i].text.strip().lower()
data = []
for row in rows:
cells = row.find_all("td")
item = {}
for index in headers:
item[headers[index]] = cells[index].text
data.append(item)
print(data)