phpweb-scrapinghtml-parsingsimpledom

Php screen scraping using php simple dom parser


I am using simple html dom parser to scrape a website ... How can i skip a particular class while in a loop


Solution

  • Judging from http://simplehtmldom.sourceforge.net/manual.htm#frag_find_attr you can use:

    ->find("div[class!=skip_me]")
    

    Or use the DOM methods and check with ->getAttribute("class") against a value.