Webscrape plugin (1 post)

  1. timo.koerner
    Posted 2 years ago #

    I have scrape in action here using the wp web scraping plugin written by Akshay.

    Looking into the 'phpquery one file' code on google (basis of the plugin), I find in the markup function, approx. line 700, towards the end of the domdocumentwrapper class the following loop:

    foreach($nodes as $i => $node)
    if ($node->isSameNode($this->root)) {
    //	var_dump($node);
    $nodes = array_slice($nodes, 0, $i)
    + phpQuery::DOMNodeListToArray($node->childNodes)
    + array_slice($nodes, $i+1);

    Looking at my scrape example again (see link above), there are no line breaks of the scraped sports website.
    However, in the above function there is no echo. How can I manage to use the wp scraper plugin with line breaks?

    Furthermore I never saw "+" in php for concatenation, only the dot.


Topic Closed

This topic has been closed to new replies.

About this Topic