shell批量采集百度下拉词

2025-05-30 00:53:08

1、# 接口https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=关键词测试下:https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=seo可以用

shell批量采集百度下拉词

2、# 测试# curl -s "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=seo"

shell批量采集百度下拉词

3、# 编码有点问题,换编码curl -s "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=seo"|iconv -f gbk -t utf-8# iconv -f gbk -t utf-8 是把gbk换成utf-8的,如果没有编码问题就不用替换。

shell批量采集百度下拉词

4、#提取关键词-初步提取curl -s "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=seo"|iconv -f gbk -t utf-8|awk -F":" '{print $4}'# awk -F":" '{print $4}' 意思指数以“:”为分隔符,取第四项。

shell批量采集百度下拉词

5、#提取关键词-正则提取curl -s "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=seo"|iconv -f gbk -t utf-8|awk -F":" '{print $4}'|grep -oP '(?<=").*?(?=")'

shell批量采集百度下拉词

6、# 去掉 ,curl -s "https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=seo"|iconv -f gbk -t utf-8|awk -F":" '{print $4}'|grep -oP '(?<=").*?(?=")'|sed 's/,//g'

shell批量采集百度下拉词
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
相关推荐
  • 阅读量:90
  • 阅读量:43
  • 阅读量:94
  • 阅读量:53
  • 阅读量:42
  • 猜你喜欢