[pangp] Add Palo Alto Networks GlobalProtect App
This commit is contained in:
@@ -9,7 +9,6 @@ list = {}
|
||||
|
||||
for i in range(17, 27):
|
||||
url = "https://www.haproxy.org/download/%s/src/CHANGELOG" % (i/10)
|
||||
print(url)
|
||||
with urllib.request.urlopen(url) as response:
|
||||
for line in response:
|
||||
m = re.match(REGEX, line.decode('utf-8'))
|
||||
|
||||
20
src/pangp.py
Normal file
20
src/pangp.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import json
|
||||
import urllib.request
|
||||
from bs4 import BeautifulSoup
|
||||
from html.parser import HTMLParser
|
||||
|
||||
URL = "https://www.paloaltonetworks.com/services/support/end-of-life-announcements/end-of-life-summary"
|
||||
|
||||
list = {}
|
||||
with urllib.request.urlopen(URL, data=None, timeout=5) as response:
|
||||
soup = BeautifulSoup(response, features="html5lib")
|
||||
table = soup.find(id='globalprotect')
|
||||
for tr in table.findAll('tr')[3:]:
|
||||
td_list = tr.findAll('td')
|
||||
version = td_list[0].get_text()
|
||||
month,date,year = td_list[1].get_text().split('/')
|
||||
abs_date = f"{year}-{month:0>2}-{date:0>2}"
|
||||
list[version] = abs_date
|
||||
|
||||
with open('releases/pangp.json', 'w') as f:
|
||||
f.write(json.dumps(list, indent=2))
|
||||
Reference in New Issue
Block a user