From 2d75b3bbd98eb82f3e61b37cf0f947bff238bbb3 Mon Sep 17 00:00:00 2001 From: krzysiej Date: Mon, 9 Apr 2018 11:46:02 +0200 Subject: [PATCH] Added scraping books isbn, url and image. --- packt.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packt.php b/packt.php index 4019761..e6ae8e5 100644 --- a/packt.php +++ b/packt.php @@ -65,6 +65,9 @@ foreach ($books as $book) { $bookData['epub'] = $book->first('a[href$=epub]::attr(href)'); $bookData['mobi'] = $book->first('a[href$=mobi]::attr(href)'); $bookData['code'] = $book->first('a[href*=code_download]::attr(href)'); + $bookData['isbn'] = $book->first('div[isbn]::attr(isbn)'); + $bookData['img'] = $book->first('img[class*=imagecache]::attr(src)'); + $bookData['url'] = $book->first('div[class*=product-thumbnail]')->first('a::attr(href)'); $booksData[] = $bookData;