From 6723854591ca1fe2737d30efdcd1b0d16f2a76f9 Mon Sep 17 00:00:00 2001 From: Marc Wrobel Date: Tue, 13 Feb 2024 22:43:57 +0100 Subject: [PATCH] [palo-alto-networks] Delete unused script --- src/palo-alto-networks.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/palo-alto-networks.py diff --git a/src/palo-alto-networks.py b/src/palo-alto-networks.py deleted file mode 100644 index 8207892b..00000000 --- a/src/palo-alto-networks.py +++ /dev/null @@ -1,32 +0,0 @@ -import re - -from bs4 import BeautifulSoup -from common import dates, http, releasedata - -IDENTIFIERS_BY_PRODUCT = { - "pan-os": "pan-os-panorama", - "pan-gp": "globalprotect", - "pan-cortex-xdr": "traps-esm-and-cortex", -} - -# all products are on the same page, it's faster to fetch it only once -response = http.fetch_url("https://www.paloaltonetworks.com/services/support/end-of-life-announcements/end-of-life-summary") -soup = BeautifulSoup(response.text, features="html5lib") -for product_name, identifier in IDENTIFIERS_BY_PRODUCT.items(): - with releasedata.ProductData(product_name) as product_data: - table = soup.find(id=identifier) - for tr in table.findAll("tr")[3:]: - td_list = tr.findAll("td") - if len(td_list) <= 1: - continue - - version = td_list[0].get_text().strip().lower().replace(" ", "-").replace("*", "") - version = version.removesuffix("-(cortex-xdr-agent)") - version = version.removesuffix("-(vm-series-only)") - version = version.removesuffix("-(panorama-only)") - - # A few dates have 1st, 2nd, 4th... Remove it. - date_str = re.sub(r'(\w+) (\d{1,2})\w{2}, (\d{4})', r'\1 \2, \3', td_list[1].get_text()) - date = dates.parse_date(date_str) - - product_data.declare_version(version, date)