antsanchez / go-download-web

Download an entire website with Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for retrieval of CDN hosted assets

emmanuelay opened this issue · comments

As a user Id like to be able to download my site from my domain (ex. www.mydomain.com) along with the resources that it utilizes, that are located on a CDN (ex. Amazon Cloudfront).

With the current solution, it only fetches resources that are located on my domain.
I have forked your solution and added this as an extra parameter "-r". With this parameter you could do something like:

./go-download-web -u https://asanchez.dev -s 1 -r https://static-assets.cdn.com,https://static.assets.other-cdn.com

I've also cleaned up some problematic use of Go-routines. They were being launched without any regard to state.

Would you be interested in merging these changes into your repo?

Hi @emmanuelay
Really sorry for the late reply! Yes, please, I would be happy if you do a PR

No worries @antsanchez , check out PR #4 and let me know if you have any suggestions/objections.