WordPress.org

Ready to get started?Download WordPress

Forums

Webscrape plugin (1 post)

  1. timo.koerner
    Member
    Posted 8 months 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.

    Thanks.

Reply

You must log in to post.

About this Topic