[pangp] Add Palo Alto Networks GlobalProtect App

This commit is contained in:
Nemo
2022-05-30 14:44:14 +05:30
parent 0ef90cd369
commit fc39472416
5 changed files with 38 additions and 3 deletions

View File

@@ -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
View 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))