承接 medialam/serps-cli 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

medialam/serps-cli

Composer 安装命令:

composer create-project medialam/serps-cli

包简介

Command line utility to scrape from the terminal

README 文档

README

Command line utility to scrape from the terminal

Install

You can install it globally with composer:

composer global require serps/cli

Test installation by invoking the help message

serps help

Google

Search

Search command allows to trigger a google search from the command line

serps google:search "keyword"

example

    $ serps google:search "github"
    {
      "natural-results": [
        {
          "url": "https://github.com/",
          "title": "How people build software · GitHub",
          "types": [
            "classical",
            "classical_large"
          ]
        },
        {
          "url": "https://fr.wikipedia.org/wiki/GitHub",
          "title": "GitHub — Wikipédia",
          "types": [
            "classical"
          ]
        },
        {
          "url": "https://en.wikipedia.org/wiki/GitHub",
          "title": "GitHub - Wikipedia, the free encyclopedia",
          "types": [
            "classical"
          ]
        },
        {
          "url": "http://rue89.nouvelobs.com/2015/03/31/quest-tous-les-techos-monde-font-github-258439",
          "title": "Qu'est-ce que tous les techos du monde font sur GitHub ? - Rue89 - L ...",
          "types": [
            "classical"
          ]
        },
        {
          "url": "https://twitter.com/github?lang=fr",
          "title": "GitHub (@github) | Twitter",
          "types": [
            "classical"
          ]
        },
        {
          "url": "https://www.githubarchive.org/",
          "title": "GitHub Archive",
          "types": [
            "classical"
          ]
        },
        {
          "url": "https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin",
          "title": "GitHub Plugin - Jenkins - Jenkins Wiki",
          "types": [
            "classical"
          ]
        }
      ],
      "total-count": 1.31e+08,
      "natural-results-count": 7,
      "evaluated": true,
      "http-client": "curl",
      "url": "https://www.google.fr/search?q=github&gws_rd=cr&ei=kH7OV7LaForeU_yGhtgC",
      "initial-url": "https://google.com/search?q=github"
    }

Tip: In the example jq helped to pretty format the outputted json: $ serps google:search "github" | jq '.'

Advanced usage

    $ serps google:search --tld="co.uk" --lr="lang_es" "some keywords" phantomjs

With proxy:

    $ serps google:search --proxy="http://proxy:8080" "some keywords"

Page and result per page:

    $ serps google:search --page=2 --res-per-page=20 "some keywords"

User Ageng:

    $ serps google:search --user-agent="..." "some keywords"

Mobile search

This is an alertnative to the user agent option to use an hard coded mobile user agent

    $ serps google:search --mobile "some keywords"

Dump page in a file:

In a addition of printing the results you can save the dom in a file

    $ serps google:search --dump="/path/to/file.html" "some keywords"

By default the dump option wont be able to process if the file you specify already exists. The option force-dump makes it able to override an existing file:

    $ serps google:search --dump="/path/to/file.html" --force-dump=true "some keywords"

Read and parse a html google file saved locally instead of doing http query

    $ serps google:search --file=./google--search-file.html "some keywords"

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: Fair
  • 更新时间: 2020-10-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固