shell批量采集百度下拉词

 时间:2024-10-20 00:17:06

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批量采集百度下拉词
  • 新惊天动地的技能阶级数据资料
  • 防止网站被挂马的五个有效方法
  • 日期和int类型的相加减
  • 如何声明HTML5
  • 热门搜索
    如何制作pdf 复仇之矛大招怎么用 如何治早 蟋蟀的耳朵长在哪里 内蒙古旅游景点地图 嘴唇厚如何变薄 皮肤晒伤怎么处理 潮州旅游景点大全 如何移民澳大利亚 脸上长小痘痘怎么办