Ciao a tutti , sono alle prime armi e sto cercando di fare uno scraper che mi servirebbe per il mio sito web, lo scraper dovrebbe prelevare questa testo: "Segnalibri 3D - Lupo nella Neve"
da questa porzione di codice:
Ho provato in questa maniera ma lo script mi restituisce sempre l' errore "Name not found"codice:<tbody><tr> <td class="pageHeadingProduct" valign="top"><h1>Segnalibri 3D - Lupo nella Neve</h1> <span class="smallText"> Codice Prodotto BOOK05</span> </td> </tr> </tbody>
Please help mecodice:// name if (preg_match('~<td[^>]*?class="pageHeadingProduct"[^>]*>([^<]+)~is', $content, $m)) { $item['Name'] = trim(html_entity_decode(strip_tags($m[1]), ENT_QUOTES, 'UTF-8')); } else { $this->_log(MESSAGE, 'Name not found. Skip.'); return; }

Rispondi quotando