fix: [stackpath] now a txt file is included on the stackpath

pull/204/head
Alexandre Dulaunoy 2022-01-04 15:45:01 +01:00
parent 92bee338a0
commit 697aec2821
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 4 additions and 3 deletions

View File

@ -92,15 +92,16 @@ def process(files, dst):
if __name__ == '__main__':
sp_base_url = "https://support.stackpath.com/hc/en-us/articles/360001091666-Whitelist-CDN-WAF-IP-Blocks"
# Base url where a text file is attached https://support.stackpath.com/hc/en-us/articles/360001091666-Whitelist-CDN-WAF-IP-Blocks"
sp_base_url = "https://support.stackpath.com/hc/en-us/article_attachments/360096407372/ipblocks.txt"
filename = 'ipblocks.txt'
sp_dst = 'stackpath'
to_process = list()
url = get_file_link(sp_base_url, filename)
#url = get_file_link(sp_base_url, filename)
file = 'stackpath_{}'.format(filename)
download_to_file(url, file)
download_to_file(sp_base_url, file)
to_process.append(file)
process(to_process, sp_dst)