$output->setTitle($title); $newitem->setTitle($title); } if ($do_content_extraction) { if ($extract_pattern && isset($content_block)) { $xpath = new DOMXPath($readability->dom); $elems = @$xpath->query($extract_pattern, $content_block); // check if our custom extraction pattern matched if ($elems && $elems->length > 0) { $extract_result = true; // get the first matched element $content_block = $elems->item(0); //echo "12121"; // clean it up $readability->removeScripts($content_block); $readability->prepArticle($content_block); } } } } if ($do_content_extraction) { // if we failed to extract content... if (!$extract_result) { if ($exclude_on_fail) { continue; } // skip this and move to next item //TODO: get text sample for language detection if (!$valid_key) { $html = $options->error_message; } else {