GithubHelp home page GithubHelp logo

cli-dom-crawler's Introduction

cli-dom-crawler

PHP Dom Crawler for commandline

Install

Clone the repository and install dependencies with composer.

composer install

Commands

Commands can be run by command line with php. php ./src/cli-dom-crawler.php <command>

List Nodes

List nodes and their attributes from a website.

php ./src/cli-dom-crawler.php <url> <node> <attributes>

Example: php ./src/cli-dom-crawler.php https://www.google.com a href

+---------------------+----------------------------------------------------------------------------------------------+
| text                | href                                                                                         |
+---------------------+----------------------------------------------------------------------------------------------+
| Images              | https://www.google.com/imghp?hl=en&tab=wi                                                    |
| Maps                | https://maps.google.com/maps?hl=en&tab=wl                                                    |
| Play                | https://play.google.com/?hl=en&tab=w8                                                        |
| YouTube             | https://www.youtube.com/?tab=w1                                                              |
| News                | https://news.google.com/nwshp?hl=en&tab=wn                                                   |
| Gmail               | https://mail.google.com/mail/?tab=wm                                                         |
| Drive               | https://drive.google.com/?tab=wo                                                             |
| More »              | https://www.google.com/intl/en/options/                                                      |
| Web History         | http://www.google.com/history/optout?hl=en                                                   |
| Settings            | /preferences?hl=en                                                                           |
| Sign in             | https://accounts.google.com/ServiceLogin?hl=en&passive=true&continue=https://www.google.com/ |
| Advanced search     | /advanced_search?hl=en&authuser=0                                                            |
| Language tools      | /language_tools?hl=en&authuser=0                                                             |
| AdvertisingPrograms | /intl/en/ads/                                                                                |
| Business Solutions  | /services/                                                                                   |
| +Google             | https://plus.google.com/116899029375914044550                                                |
| About Google        | /intl/en/about.html                                                                          |
| Privacy             | /intl/en/policies/privacy/                                                                   |
| Terms               | /intl/en/policies/terms/                                                                     |
+---------------------+----------------------------------------------------------------------------------------------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.