diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 942e113f..7c77a045 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -43,9 +43,10 @@ jobs: run: | git config --global init.defaultBranch main git config --global extensions.partialClone true + pip install -r requirements.txt - python src/unrealircd.py - python src/haproxy.py + for i in src/*.py; do python $i;done + bundle exec ruby update.rb ./website ~/.cache releases id: update_releases - uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/releases/pangp.json b/releases/pangp.json new file mode 100644 index 00000000..1601a1af --- /dev/null +++ b/releases/pangp.json @@ -0,0 +1,10 @@ +{ + "3.0": "2016-02-16", + "3.1": "2016-06-23", + "4.0": "2017-01-30", + "4.1": "2018-03-01", + "5.0": "2019-02-12", + "5.1": "2019-12-12", + "5.2": "2020-07-30", + "5.3": "2021-06-01" +} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 26972201..2b7e64d6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,6 @@ +beautifulsoup4==4.11.1 +html5lib==1.1 mwparserfromhell==0.6.4 +six==1.16.0 +soupsieve==2.3.2.post1 +webencodings==0.5.1 diff --git a/src/haproxy.py b/src/haproxy.py index a6f613ca..13c71eae 100644 --- a/src/haproxy.py +++ b/src/haproxy.py @@ -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')) diff --git a/src/pangp.py b/src/pangp.py new file mode 100644 index 00000000..69b68053 --- /dev/null +++ b/src/pangp.py @@ -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))