evaluate("//p[@id=\"band-name-location\"]//span[@class=\"title\"]")->item(0)->textContent;
$items = json_decode($document->evaluate("//ol[@id=\"music-grid\"]")->item(0)->getAttribute("data-client-items"), true);
?>
evaluate("//p[@id=\"band-name-location\"]//span[@class=\"title\"]")->count())
echo "
";
echo "
";
foreach ($releases as $release) {
$title = preg_split("/\n[\n\s]+/", trim($document->evaluate(".//p[@class=\"title\"]", $release)->item(0)->textContent));
unset($text);
if (array_key_exists(1, $title)) $text = "by " . htmlspecialchars($title[1]);
$image = $document->evaluate(".//img", $release)->item(0);
$image = $image->hasAttribute("data-original") ? $image->getAttribute("data-original") : $image->getAttribute("src");
$image = resize_link($image, 3);
$image = convert_bandcamp_link($image);
$link = $document->evaluate(".//a", $release)->item(0)->getAttribute("href");
$link = prefix_link($link, "name");
$link = convert_bandcamp_link($link);
echo_item($link, $image, htmlspecialchars($title[0]), $text ?? null);
};
if (isset($items)) {
foreach ($items as $item) {
$title = $item["title"];
unset($text);
if (array_key_exists("artist", $item)) $text = "by " . $item["artist"];
$image = $item["art_id"];
$image = "https://f4.bcbits.com/img/a" . $image . "_0.jpg";
$image = resize_link($image, 3);
$image = convert_bandcamp_link($image);
$link = prefix_link($item["page_url"], "name");
$link = convert_bandcamp_link($link);
echo_item($link, $image, htmlspecialchars($title), $text ?? null);
};
};
echo "
";
$image = $document->evaluate("//div[contains(@class, \"bio-pic\")]//a")->item(0);
if ($image) {
$image = $image->getAttribute("href");
$image = resize_link($image, 4);
};
$description = $document->evaluate("//meta[@property=\"og:description\"]")->item(0)->getAttribute("content");
$links = $document->evaluate("//ol[@id=\"band-links\"]//a");
echo_sidebar($image, $description, $links);
echo "
";
?>