Closed Rhynorater closed 6 years ago
Also, note, I did try to implement this, but Go doesn't like me...
I tried to add a CMD param like so:
var dates bool
var withSubs bool
flag.BoolVar(&dates, "dates", false, "show date of fetch in the first column")
flag.BoolVar(&withSubs, "withSubs", true, "pull URLs for subdomains of the hosts provided as well")
and then pass it into the functions getWaybackURLs and getCommonCrawlURLs via this:
resp, err := fetch(domain, withSubs)
Once I modified the resulting functions to look like this:
func getWaybackURLs(domain string, withSubs bool) ([]wurl, error) {
if withSubs {
res, err := http.Get(
fmt.Sprintf("http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&collapse=urlkey", domain),
)
} else {
res, err := http.Get(
fmt.Sprintf("http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&collapse=urlkey", domain),
)
}
But Go didn't like that... I don't speak Go hahaha.
Hey, @Rhynorater! Good idea :)
I'll have a poke at it now
I've added a --no-subs
option in 41bb26a
The only real problem with it is that the searches still often include subdomains, so the actual behaviour doesn't quite line up with the expected behaviour.
I'll add some additional filtering I think
@Rhynorater I've added some output filtering so you only get results for the exact input domain if you specify the --no-subs
option in 58bbafe
Give it a try and let me know if you hit any problems :)
Thanks Tom! Sounds great!
On Tue, Aug 28, 2018 at 11:53 AM, Tom Hudson notifications@github.com wrote:
I've added a --no-subs option in 41bb26a https://github.com/tomnomnom/waybackurls/commit/41bb26a77e181fbc571aeb1d67fed4ba74ccd560
The only real problem with it is that the searches still often include subdomains, so the actual behaviour doesn't quite line up with the expected behaviour.
I'll add some additional filtering I think
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tomnomnom/waybackurls/issues/3#issuecomment-416638840, or mute the thread https://github.com/notifications/unsubscribe-auth/AC2_r0a33rDEPuQeWmSFHeicYg0MYgs9ks5uVWdwgaJpZM4WPnr3 .
-- Justin Gardner Cell: (804)525-8089
Hey Tom!
Great tool! I was wondering if it would be possible for you to add a command-line arg to select URLs only from the base domain provided. The new WayBack Machine query would look like this:
as opposed to the one that pulls all subdomains too (currently in your code) which is this:
I propose that this param should be called "with_subs" and should be Boolean defaulting to True.
Thanks, Justin