Giter VIP home page Giter VIP logo

stork's People

Contributors

w4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

stork's Issues

Stop the 'same' results being returned for a single Storkable

When starting on a website like stackoverflow you'll get tons of the "same" links back over and over again for a single page (like tags for example), we should probably make Storkable's <T> impl Hash and keep a little vec with the hashes 'seen' so we don't return the same links over and over (though this functionality might be helpful or even necessary in some scenarios/protocols).

Expose a way to check if a value has been seen before

We store hashes of each direct descendant's Storkable::value in each Storkable as a fix for #1 and we don't expose this to consumers. Right now consumers have to create a flat Vec and hash each Storkable::value themselves to check if they've seen the link before - even if they've all come from the same parent.

We need to figure out a good API to see if a "value" has been seen before from any parent, for example if the heirarchy looks like this:

root
↳ 123
 ↳ 456
  ↳ 789
↳ abc
 ↳ def
  ↳ ghi

We'd expect root.seen(789) and 123.seen(456) to be true but 456.seen(123) or abc.seen(123) not to be.

Right now children only hold references to their parents and not vice-versa so this lookup can currently only be done in reverse.

Make attributes matchable in stork_http

Right now we only have a filter on And(Name("a"), Not(Attr("rel", "nofollow"))). Maybe we should just match all <a href=...> tags and the rel="nofollow" requirement should just come under a default attribute Filter or something?

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.