Closed youngblood closed 4 years ago
I have actually since seen some instances of this with the save_webpage() method. I also just saw this in a run where '.svg' is explicitly allowed via
pywebcopy.config['allowed_file_ext'] = ['.html','.css','svg','.js',
'.jpg','.png','.htm','jpeg',
'.php','.asp','.aspx','xhtml',
'.xml','.gif','.pdf','.json']
It is working as expected. The .png
files that are allowed despite config restrictions are actually internal css linked files. For example: if a css rule has a background property set as an image, here irrespective of the config restrictions the file would be downloaded and you would see an message like
.css
file type is allowed forimage.jpeg
So it is expected behaviour for any kind of file that is found inside css rules.
That makes perfect sense - thank you for replying so quickly!
This issue is resolved.
Using the 'WebPage' class and
WebPage.save_assets()
, and having explicitly setpywebcopy.config['allowed_file_ext'] = ['.html','.css']
, I'm seeing inconsistent handling of some filetypes. Specifically, it seems to be misinterpreting filetypes at times:From what I can tell, the same issue does not happen when using
pywebcopy.save_webpage()
.Code: