Upload Code
loading-left
loading loading loading
loading-right

Loading

Profile
No self-introduction
codes (1)
Thread programming using Python
no vote
Add another instance of the queue, the queue is then passed to the first thread pool class ThreadURL. Then, for another thread pool class DatamineThread, copied almost exactly the same structure. In the run method in this class, get Web pages from each thread in the queue, blocks of text, then uses Beautiful Soup this text block. In this example, uses Beautiful Soup to extract each page's title tag, and print output. Can easily extend this example to the scenarios some more valuable, because you have mastered the basic core content search engines or data-mining tools. One idea is to use Beautiful Soup extract links from every page, and then follow them for navigation.
herdboy
2016-08-23
0
1
No more~