phpQuery Web Scraping Event

Asked

Viewed 198 times

1

I want to get information from the website using phpQuery, but I’m still learning how to use.

The information I want to get appears in a select but only after clicking it. Without clicking it returns only one <option value=""></option>

I would like if you have a pick up the values as if you had clicked on select to show other options.

<?php
require('phpQuery/phpQuery.php');

$pagina = 'http://veiculos.fipe.org.br/';

phpQuery::newDocumentFileHTML($pagina); // instanciando a classe com a variavel da url

echo '<h2>O conteudo do ID selectMarcacarro é</h2>';

$titleElement3 = pq('#selectMarcacarro'); // capturando elemento de ID deivison do documento test.html

echo '<p>' . htmlentities( $titleElement3->html() ) . '</p>'; // exibindo o resultado

Also, there is some easy method of making web scraping?

  • What is the use ? It is necessary to be in PHP ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.