crawler

package
v0.0.0-...-92ec744 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2015 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessMessage

func ProcessMessage(q queue.Connection, d db.Connection, msg *queue.Message)

ProcessMessage initializes a crawler to parse a specific url and crawls its html looking for images.

Types

type Crawler

type Crawler struct {
	// contains filtered or unexported fields
}

Crawler is in charge of crawl a specific url received in a message. It puts new messages in the queue when it finds new urls. It saves images in the database.

func (Crawler) Crawl

func (c Crawler) Crawl()

Crawl sends a GET request to the url in the message and parses the response. It creates new messages for new URLs in the page. It stores images found in the page.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL