Lines Matching defs:html
31 $html = $http->get($url);
32 if (!$html) throw new \Exception('Could not fetch data from isdn.de. ' . $http->error);
36 $data['id'] = $this->extract('/<meta property="og:book:isbn" content="([^"]+)"/', $html);
38 $data['url'] = $this->extract('/<meta property="og:url" content="([^"]+)"/', $html);
40 $data['title'] = $this->extract('/<meta property="og:title" content="([^"]+)"/', $html);
42 $data['published'] = $this->extract('/<meta property="og:book:release_date" content="((\d){4})[^"]+"/', $html);
44 $data['authors'] = $this->extractAll('/<a href="\/person\/.*?">(.+?)<\/a>/', $html);
45 $data['publisher'] = $this->extract('/<a href="\/verlag\/.*?">(.+?)<\/a>/', $html);
54 * @param string $html
58 protected function extract($regex, $html, $group = 1)
60 if (preg_match($regex, $html, $m)) {
70 * @param string $html
74 protected function extractAll($regex, $html, $group = 1)
76 if (preg_match_all($regex, $html, $m)) {