-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from crawlab-team/develop
fixed crawlab-team/artipub#27
- Loading branch information
Showing
6 changed files
with
86 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
const BaseSpider = require('./base') | ||
const constants = require('../constants') | ||
|
||
class WechatSpider extends BaseSpider { | ||
async afterInputEditor() { | ||
} | ||
|
||
async publish() { | ||
// 发布文章 | ||
// const elPub = await this.page.$(this.editorSel.publish) | ||
// await elPub.click() | ||
// await this.page.waitFor(20000) | ||
|
||
// 后续处理 | ||
await this.afterPublish() | ||
} | ||
|
||
async afterPublish() { | ||
// this.task.url = await this.page.url().replace('#reply0', '') | ||
// if (!this.task.url.match(/\/t\/\d+/)) return | ||
// this.task.updateTs = new Date() | ||
// this.task.status = constants.status.FINISHED | ||
// await this.task.save() | ||
} | ||
|
||
async fetchStats() { | ||
} | ||
} | ||
|
||
module.exports = WechatSpider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters