Skip to content

Commit 7e0e567

Browse files
author
remitchell
committed
2 parents ad8848e + 57201f1 commit 7e0e567

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Web Scraping with Python Code Samples
22

3-
These code samples are for the book <a href="http://shop.oreilly.com/product/0636920078067.do">Web Scraping with Python</a>
3+
These code samples are for the book <a href="http://shop.oreilly.com/product/0636920078067.do">Web Scraping with Python 2nd Edition</a>
44

55
If you're looking for the first edition code files, they can be found in the <a href="https://github.com/REMitchell/python-scraping/tree/master/v1">v1</a> directory.
66

77
Most code for the second edition is contained in <a href="https://jupyter.org/install.html">Jupyter notebooks</a>. Although these files can be viewed directly in your browser in Github, some formatting changes and oddities may occur. I recommend that you clone the repository, install Jupyter, and view them locally for the best experience.
88

9-
The web changes, libraries update, and I not infrequently make mistakes or typos. If you think you've spotted an error, please feel free to make a pull request against this repository.
9+
The web changes, libraries update, and make mistakes and typos more frequently than I'd like to admit! If you think you've spotted an error, please feel free to make a pull request against this repository.

chapter16/multiprocess_queue.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def task_delegator(taskQueue, foundUrlsQueue):
2121
for link in links:
2222
#Add new link to the taskQueue
2323
taskQueue.put(link)
24+
#Add new link to the visited list
25+
visited.append(link)
2426

2527
def get_links(bsObj):
2628
links = bsObj.find('div', {'id':'bodyContent'}).find_all('a', href=re.compile('^(/wiki/)((?!:).)*$'))
@@ -51,4 +53,4 @@ def scrape_article(taskQueue, foundUrlsQueue):
5153
processes.append(Process(target=scrape_article, args=(taskQueue, foundUrlsQueue,)))
5254

5355
for p in processes:
54-
p.start()
56+
p.start()

0 commit comments

Comments
 (0)