We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
讨论请求出带抓取文件队列后的下载问题。
The text was updated successfully, but these errors were encountered:
@wangtonghe
.setHandler(new FileDownloadHandler("/Users/pg/Desktop")) .setHandler(new ConsoleHandler())
down文件方法写在process里更易懂, .setHandler(new ConsoleHandler()) 这行的作用是什么,能不能更简化一点
process
.setHandler(new ConsoleHandler())
Sorry, something went wrong.
new ConsoleHandler() 设置处理结果的处理器,这个是设置在控制台输出
new ConsoleHandler()
可以设置多个处理器。比如
.setHandler(new JsonFileHandler(PATH,FILENAME)) .setHandler(new ConsoleHandler())
会将爬取结果打印到控制台、保存在json文件中。 自感觉文件下载也是处理结果的一种方式,若用户在爬取过程中想下载某些文件,在这加一个文件结果处理器,然后在process中把文件url放入结果集即可。这样和普通的爬取处理一致。
No branches or pull requests
讨论请求出带抓取文件队列后的下载问题。
The text was updated successfully, but these errors were encountered: