Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix closespider_itemcount/timeout features #79

Merged
merged 6 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ historical archival.
middlewares: [
Crawly.Middlewares.DomainFilter,
Crawly.Middlewares.UniqueRequest,
Crawly.Middlewares.UserAgent
{Crawly.Middlewares.UserAgent, user_agents: ["Crawly Bot"]}
],
pipelines: [
{Crawly.Pipelines.Validate, fields: [:url, :title]},
{Crawly.Pipelines.DuplicatesFilter, item_id: :title},
Crawly.Pipelines.JSONEncoder,
{Crawly.Pipelines.WriteToFile, extension: "jl", folder: "/tmp"} # NEW IN 0.7.0
{Crawly.Pipelines.WriteToFile, extension: "jl", folder: "/tmp"}
],
port: 4001
```
Expand Down Expand Up @@ -108,7 +108,7 @@ You can read more here:

1. [x] Pluggable HTTP client
2. [x] Retries support
3. [ ] Cookies support
3. [x] Cookies support
4. [x] XPath support - can be actually done with meeseeks
5. [ ] Project generators (spiders)
6. [ ] UI for jobs management
Expand Down
2 changes: 1 addition & 1 deletion documentation/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Goals:
Crawly.Middlewares.DomainFilter,
{Crawly.Middlewares.RequestOptions, [timeout: 30_000]},
Crawly.Middlewares.UniqueRequest,
Crawly.Middlewares.UserAgent
{Crawly.Middlewares.UserAgent, user_agents: ["Crawly Bot"]}
],
pipelines: [
{Crawly.Pipelines.Validate, fields: [:title, :url]},
Expand Down
2 changes: 1 addition & 1 deletion lib/crawly/manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ defmodule Crawly.Manager do

maybe_stop_spider_by_timeout(
state.name,
items_count,
delta,
closespider_timeout_limit
)

Expand Down