Filter out 'no banner' banners
This commit is contained in:
parent
61153e6b11
commit
75e0fd14ad
@ -137,12 +137,14 @@ def mirror(cat_url, args):
|
||||
for groupname, group_url in group_urls.items():
|
||||
page = get_page(group_url)
|
||||
banner_urls = {urllib.parse.urljoin(group_url, banner['src'])
|
||||
for banner in page.select('p.centre img')}
|
||||
for banner in page.select('p.centre img')
|
||||
if 'simfileNoBanner.png' not in banner['src']}
|
||||
for url in banner_urls:
|
||||
filename = f'songs/{groupname}/banner.png'
|
||||
headers = f'zips/{groupname}-banner.headers'
|
||||
req_headers = load_prev_headers(filename, headers)
|
||||
retrieve(url, filename, extract=False, headers=req_headers, save_headers=headers)
|
||||
retrieve(url, filename, extract=False,
|
||||
headers=req_headers, save_headers=headers)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user