Page MenuHomePhorge

No OneTemporary

diff --git a/spotify_playlist_popularity.php b/spotify_playlist_popularity.php
index ffe12ac..4f86817 100644
--- a/spotify_playlist_popularity.php
+++ b/spotify_playlist_popularity.php
@@ -1,44 +1,44 @@
<html>
<head>
<title>Spotify playlist track popularity rank</title>
<meta name="description" content="Simple form for entering a Spotify playlist and returning a list ranked by popularity score">
</head>
<body>
<form action="" method="GET">
<p><strong>Enter a Spotify playlist URL:</strong> <input name="URL" id="URL"></p>
<p><button>Submit</button></p>
</form>
<p>Pro-tip: this is secretly a TSV spreadsheet for you nerrrrds</p>
<br/>
<?php
if($_GET['URL']) {
$url = $_GET['URL'];
if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
die("Sorry, only valid URLs are currently supported. Take it up with Keith! He probably just forgot to make URIs work too. Or maybe what you pasted in isn't valid as either...");
}
# Run Python script (should rewrite in PHP sometime...)
$out = shell_exec("python3 generate_hot100.py $url");
if (strpos($out, "[]") === FALSE) {
- print("</pre>$out</pre>");
+ print("</pre>".$out."</pre>");
} else {
print("Didn't seem to get a valid response from Spotify's API, pester Keith to figure out why");
}
#error_log("Okay, done");
} else {
#error_log("No URL?");
}
?>
</body>
</html>

File Metadata

Mime Type
text/x-diff
Expires
Fri, May 16, 6:59 PM (16 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
158303
Default Alt Text
(1 KB)

Event Timeline