Questions tagged [domcrawler]

The DomCrawler is a Symfony component for PHP which eases DOM navigation for HTML and XML documents.

The DomCrawler component eases DOM navigation for HTML and XML documents and is part of the the Symfony PHP components.

The filter() function accepts the jQuery Selector Syntax and eases the selection of HTML tags and attributes.

Documentation

179 questions
1
vote
1 answer

Can't Scrape Attribute of from Sibling Element

I am trying to scrape some data using Symfony2, Goutte, and DomCrawler. I have a tricky situation where I need to get a value of an attribute inside a . Working section: $query = "//td[normalize-space(text()) = 'Event…
Kenny
  • 2,124
  • 3
  • 33
  • 63
1
vote
2 answers

DOMCrawler not dumping data properly for parsing

I'm using Symfony, Goutte, and DOMCrawler to scrape a page. Unfortunately, this page has many old fashioned tables of data, and no IDs or classes or identifying factors. So I'm trying to find a table by parsing through the source code I get back…
Kenny
  • 2,124
  • 3
  • 33
  • 63
1
vote
0 answers

How to set the athentication destails for Symfony DomCrawler?

I am trying to crawl some web pages that need authentication, i.e. first you should login and then you can access the pages. For that I am trying to use Symfony\Component\DomCrawler\Crawler in my application (I am not using the Symfony Framework, I…
Musa Haidari
  • 2,109
  • 5
  • 30
  • 53
1
vote
2 answers

Checking for a table row using DomCrawler

I am writing a phpunit test... on my page I have several rows, one of them is like this: MATCH Some are like this: NOT A MATCH 1 NOT A MATCH…
b85411
  • 9,420
  • 15
  • 65
  • 119
1
vote
0 answers

Crawl an AJAX page with Goutte in PHP

I'm trying to crawl an AJAX website with Goutte, and the Symfony Dom Crawler to get some articles for our online shop. I get the error: Undefined index: HTTP_ACCEPT_LANGUAGE The address is http://b2b.asicsonline.com/adg/welcome I can't get the…
Delly Fofie
  • 304
  • 2
  • 9
1
vote
1 answer

Adding Additional Fields to Symfony Form before Submit

I'm using Goutte, https://github.com/fabpot/goutte, and have the following code, $client = new Client(); $crawler = $client->request('GET', \Config::get('Eload2::url')); $form = $crawler->selectButton('Submit')->form(); // add extra fields…
sulaiman sudirman
  • 1,826
  • 1
  • 24
  • 32
1
vote
1 answer

Get list of select option values using symfony domcrawler

In a unit test, I want to obtain the list of select option values. My page contains a form with a dropdown list