Skip to content

Commit

Permalink
Fixed undefined methods en documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tijme committed Jun 4, 2017
1 parent b1e3ded commit e1d1dee
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -97,7 +97,7 @@ You can also use the `kitchen sink <https://tijme.github.io/not-your-average-web
print("Crawler started.")
def cb_crawler_after_finish(queue):
print("Crawler finished, found " + str(queue.get_count()) + " requests.")
print("Crawler finished, found " + str(queue.count_finished) + " requests.")
def cb_request_before_start(queue, queue_item):
print("Starting: {}".format(queue_item.request.url))
Expand Down
3 changes: 0 additions & 3 deletions docs/build/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion docs/source/getting_started.rst
Expand Up @@ -21,7 +21,7 @@ Minimal implementation
print("Crawler started.")
def cb_crawler_after_finish(queue):
print("Crawler finished, found " + str(queue.get_count()) + " requests.")
print("Crawler finished, found " + str(queue.count_finished) + " requests.")
def cb_request_before_start(queue, queue_item):
print("Starting: {}".format(queue_item.request.url))
Expand Down
4 changes: 2 additions & 2 deletions docs/source/options_callbacks.rst
Expand Up @@ -82,7 +82,7 @@ Can be used to run some code after the crawler finished crawling. It receives on
def cb_crawler_after_finish(queue):
# Print the amount of request/response pairs that were found.
print("Crawler finished, found " + str(queue.get_count()) + " requests.")
print("Crawler finished, found " + str(queue.count_total) + " requests.")
# Iterate over all request/response pairs that were found.
for queue_item in queue.get_all():
Expand Down Expand Up @@ -132,7 +132,7 @@ Can be used to run some code after the request finished executing. It receives t
def cb_request_after_finish(queue, queue_item, new_queue_items):
percentage = str(int(queue.get_progress()))
total_requests = str(queue.get_count())
total_requests = str(queue.count_total))
print("At " + percentage + "% of " + total_requests + " requests ([" + str(queue_item.response.status_code) + "] " + queue_item.request.url + ").")
Expand Down

0 comments on commit e1d1dee

Please sign in to comment.