Skip to content
New issue

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

兼容最新版微信抓取 #29

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions rule/index.js
Expand Up @@ -7,7 +7,8 @@ const {
getComments,
getProfileBasicInfo,
getPostList,
handleProfileHtml
handleProfileHtml,
getNextPostLink,
} = require('./wechatRule');
const basicAuth = require('./basicAuth');
const config = require('../config');
Expand Down Expand Up @@ -80,7 +81,10 @@ const rule = {
if (!config.rule.profile.disable) {
nextLink = yield models.Profile.getNextProfileLink();
}
if (!nextLink) nextLink = '';
if (!nextLink) {
nextLink = yield getNextPostLink();
debug('没有需要抓取的公众号了,自动开始文章抓取');
}
debug('nextLink', nextLink);
return {
response: {
Expand Down
1 change: 1 addition & 0 deletions rule/wechatRule.js
Expand Up @@ -583,4 +583,5 @@ module.exports = {
getProfileBasicInfo,
getPostList,
handleProfileHtml,
getNextPostLink,
};