Giter Site home page Giter Site logo

Comments (5)

Rhynorater avatar Rhynorater commented on July 27, 2024

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.

from waybackurls.

tomnomnom avatar tomnomnom commented on July 27, 2024

Hey, @Rhynorater! Good idea :)

I'll have a poke at it now

from waybackurls.

tomnomnom avatar tomnomnom commented on July 27, 2024

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

from waybackurls.

tomnomnom avatar tomnomnom commented on July 27, 2024

@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 :)

from waybackurls.

Rhynorater avatar Rhynorater commented on July 27, 2024

from waybackurls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.