环境:使用爬虫包 webmagic
配置项 maven依赖
us.codecraft
webmagic-core
0.7.3
us.codecraft
webmagic-extension
0.7.3
log4j.properties
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
接口
获取粉丝数目 (xxx替换成用户名)
https://blog.csdn.net/xxx/article/list/
获取关注者 (xxx替换成用户名)
https://blog.csdn.net/community/home-api/v1/get-follow-list?page=1&size=100&noMore=false&blogUsername=xxx
获取粉丝 (xxx替换成用户名)
https://blog.csdn.net/community/home-api/v2/get-fans-list?page=1&pageSize=100&id=0&noMore=true&blogUsername=xxx
关注别人
https://mp-action.csdn.net/interact/wrapper/pc/fans/v1/api/follow
body:参数
{
"username": "你的账号",
"follow": "你想关注的人的账号",
"source": "WRITING_RANK",
"fromType": "",
"detailSourceName": ""
}
header:加上cookie
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)