Comments (3)
I'm assuming you mean minimum depth. One of the misconceptions with navigation is that there is one way to reach a page. The depth of a page can be different depending on the route you take to get to the page. Also, where is the homepage? Is it the page you started the crawl from or the url with the shortest url?
If we took it as the first page that was crawled and passed a depth number down with the crawl it would not be guaranteed to give accurate results as each page is only processed once, and if there was a page that was linked to from the homepage (depth 1) but was actually crawled based on a sub page of the homepage it would have a depth of 2.
Its something to think about, I suppose if you specified a page as the root and then processed all pages crawled after completion for the shortest route (we have the data for that) then that would give the most accurate results. But again, html navigation is not a tree structure, its a node graph with multiple parents and interconnections.
from cobweb.
Thats correct, and that it would be inaccurate to report depth
when processing the content. However, is there a way we can limit the crawl to a certain depth?
Lets say, we start from the seed url, and we only prefer to go 2 pages deep within the navigation. Is that possible with CobWeb? This is certainly possible with Anemone crawler, but it is an old gem, now. I love the way CobWeb uses Sidekiq/Resque jobs, and would really prefer to limit the crawl depth for the crawler.
Between, thanks again for the awesome gem. Really useful.
from cobweb.
I agree on both points, this is a really cool gem 👍 and would like to have a "max_depth" option. I totally understand that we're not dealing with tree data and that "depth" is relative, but it would still be useful. The nice thing it would give you is a chance to do a quick test of the "core" links from a page, following just a couple without processing the entire site so you can preview some results without waiting for the whole site to process.
from cobweb.
Related Issues (20)
- Encoding problems HOT 5
- Improve connection handling
- Standalone Crawler gives error for redis HOT 6
- `require': cannot load such file -- resque (LoadError) HOT 3
- Should be possible to use Ruby's URI implementation instead of Addressable::URI HOT 3
- Inbound links are not normalized when stored
- Code organization HOT 1
- Binary not installed HOT 1
- Redirect Limit causing crawl to stop
- LoadError with version 1.0.26 HOT 2
- error while installing cobweb-1.0.28.gem: Invalid argument @ rb_sysopen HOT 5
- Cobweb gem causes Rails app to run 10x slower HOT 9
- How can I start stop crawling website HOT 1
- Should depend on slop 3.6.0 or update cobweb bin HOT 1
- Error on first run HOT 2
- undefined method `banner' for main:Object (NoMethodError) on calling from command line HOT 1
- Falling into Crawl Traps HOT 10
- Feature request: Stop crawl at time HOT 3
- Error raised when there's a valid <base> tag in <head> HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cobweb.