• 抓取各个浏览器引擎关键字,,百度学术关键字


    百度学术
    $list_arr = getbaiduxueshu($row['name']);
    $list_arr = explode('(',$list_arr);
    $list_arr = explode(')',$list_arr[1]);
    $list_arr = json_decode($list_arr[0]);
    $list_arr = $list_arr->s;

    //百度学术平台热词地址
    function getbaiduxueshu($keyname = '100'){
    $url = 'http://nssug.baidu.com/su?wd='.$keyname.'&prod=xueshu&json=1&ie=utf-8&cb=jQuery1102054196148383364_1500255388940&_=1500255388947';
    return (file_get_contents($url));
    }


    http://nssug.baidu.com/su?wd=%E4%B8%89%E5%86%9C&prod=xueshu&json=1&ie=utf-8&cb=jQuery1102054196148383364_1500255388940&_=1500255388947

    360

    http://sug.so.360.cn/suggest?callback=suggest_so&encodein=utf-8&encodeout=utf-8&format=xml&word=seo

    命令行

    http://www.hekaiyu.com/seogongju/110.html


    curl-s'http://sug.so.360.cn/suggest?callback=suggest_so&encodein=utf-8&encodeout=utf-8&format=xml&word=seo'|grep"<word>"|grep-oP'(?<=<word>).*?(?=</word>)'

    百度

    https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=%E5%AE%97%E5%8A%9B&sugmode=2&json=1&p=3&sid=&req=2&bs=%E5%AE%97%E5%8A%9B&pbs=%E5%AE%97%E5%8A%9B&csor=3&pwd=%E5%AE%97%E5%8A%9B&cb=jQuery110206449440490690221_1491446428327&_=1491446428426&qq-pf-to=pcqq.group


    https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd=%E5%AE%97%E5%8A%9B&sugmode=2&json=1&p=3&sid=&req=2&bs=%E5%AE%97%E5%8A%9B&pbs=%E5%AE%97%E5%8A%9B&csor=3&pwd=%E5%AE%97%E5%8A%9B&cb=jQuery110206449440490690221_1491446428327&_=1491446428426&qq-pf-to=pcqq.group

    粘贴到地址栏就可以看到效果

    jQuery110206449440490690221_1491446428327({"q":"好牙膏","p":false,"bs":"好牙膏","csor":"3","status":0,"g":[ { "q": "好牙膏推荐", "t": "n", "st": { "q": "好牙膏推荐", "new": 0 } }, { "q": "壳好牙膏", "t": "n", "st": { "q": "壳好牙膏", "new": 0 } }, { "q": "美白效果最好牙膏", "t": "n", "st": { "q": "美白效果最好牙膏", "new": 0 } }, { "q": "好牙膏 绿蓝红黑", "t": "n", "st": { "q": "好牙膏 绿蓝红黑", "new": 0 } }, { "q": "好牙膏品牌", "t": "n", "st": { "q": "好牙膏品牌", "new": 0 } }, { "q": "好牙膏有什么标识", "t": "n", "st": { "q": "好牙膏有什么标识", "new": 0 } }, { "q": "什么牙膏好", "t": "n", "st": { "q": "什么牙膏好", "new": 0 } }, { "q": "好牙膏中国造", "t": "n", "st": { "q": "好牙膏中国造", "new": 0 } } ],"s":["好牙膏推荐","壳好牙膏","美白效果最好牙膏","好牙膏 绿蓝红黑","好牙膏品牌","好牙膏有什么标识","什么牙膏好","好牙膏中国造"]});

    万方热词

    //从万方数据平台抓取热词
    function Posts($url, $post = null,$Token = ''){
    $context = array();

    if (is_array($post))
    {
    ksort($post);

    $context['http'] = array
    (

    'timeout'=>60,
    // 'header'=>"Token: ".$Token,
    'header' => "Content-type: application/x-www-form-urlencoded ",
    'method' => 'POST',
    'content' => http_build_query($post, '', '&'),
    );
    }

    return file_get_contents($url, false, stream_context_create($context));
    }

    //万方数据平台热词地址
    function getwanfang($pageNo = '100' ,$pageSize = '1000'){
    $url = 'http://new.wanfangdata.com.cn/hotTheme.do';
    $data = array('pageNo' => $pageNo, 'pageSize' => $pageSize );
    $json_list = Posts($url, $data);
    return json_decode($json_list);
    }

  • 相关阅读:
    Docker ntpdate Permition error
    Sublime+Golang Plugin
    顺序表和链表的区别
    Python 性能优化——对象绑定
    Fix git 提交代码错误
    UVa 10523
    UVa 10551
    UVa 10814
    UVa 10925
    Practice Round China New Grad Test 2014 报告
  • 原文地址:https://www.cnblogs.com/zongsir/p/7193867.html
Copyright © 2020-2023  润新知