Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7562845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:30:50+00:00 2026-05-30T13:30:50+00:00

I am preparing to write my first web crawler, and it looks like Anemone

  • 0

I am preparing to write my first web crawler, and it looks like Anemone makes the most sense. There is built in support for MongoDB storage, and I am already using MongoDB via Mongoid in my Rails application. My goal is to store the crawled results, and then access them later via Rails. I have a couple of concerns:

1) At the end of this page, it says that “Note: Every storage engine will clear out existing Anemone data before beginning a new crawl.” I would expect this to happen at the end of the crawl if I were using the default memory storage, but shouldn’t the records be persisted to MongoDB indefinitely so that duplicate pages are not crawled next time the task is run? If they are wiped “before beginning a new crawl”, then should I just run my Rails logic before the next crawl? If so, then I would end up having to check for duplicate records from the previous crawl.

2) This is the first time I have really thought about using MongoDB outside the context of Rails models. It looks like the records are created using the Page class, so can I later just query these as I normally would using Mongoid? I guess it is just considered a “model” once it has an ORM providing the fancy methods?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:30:52+00:00Added an answer on May 30, 2026 at 1:30 pm

    Great questions.

    1) It depends on what your goal is.

    In most cases this default makes sense. One does a crawl with anemone and examines the data.

    When you do a new crawl, the old data should be erased so that the data from the new crawl can replace it.

    You could point the storage engine at a new collection before starting the new crawl if you don’t want that to happen.

    2) Mongoid won’t create the model classes for you.

    You need to define models so that mongoid knows to create a class for the collection, and optionally define the fields that each of the documents have so that you can use the . accessor method out of the box.

    Something like:

    class Page
      include Mongoid::Document
      field :url, type: String #i'm guessing, check what kind of docs anemone produces
      field :aliases, type: Array
      field ....
    end
    

    It will probably need to include the following fields:

    • url – The URL of the page
    • aliases – Other URLs that redirected to this page, or the Page that this one redirects to
      headers – The full HTTP response headers
    • code – The HTTP response code (e.g. 200, 301, 404)
    • body – The raw HTTP response body
    • doc – A Nokogiri::HTML::Document of the page body (if applicable)
    • links – An Array of all the URLs found on the page that point to the same domain

    But please just take a look at what type (string, array, whatever) the storage engine is storing them as and don’t make assumptions.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm preparing to write a COLLADA importer in Java. There aren't any pre-written importers,
I am preparing to use continuous integration for the first time. I will be
I'm preparing to write a photonic simulation package that will run on a 128-node
I'm new to programming, but I'm preparing to write a Java program. As I'm
I have a problem tring to write to a binary file. //This is preparing
We're preparing to create a web-centred platform for schools, and we were planning to
I'm preparing to write a multithread network application. At the moment I'm wondering what's
I am preparing to write a platform independent socket protocol. After some initial research
In preparing to a OOP exam, I enjoyed seeing g++ compile the following code
I'm preparing to deploy my Django app and I noticed that when I change

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.