summaryrefslogtreecommitdiff
path: root/scraper/sc.php
diff options
context:
space:
mode:
Diffstat (limited to 'scraper/sc.php')
-rw-r--r--scraper/sc.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/scraper/sc.php b/scraper/sc.php
index f297723..1774c20 100644
--- a/scraper/sc.php
+++ b/scraper/sc.php
@@ -288,7 +288,7 @@ class sc{
if(count($description) != 0){
- $description = $count . " songs. " . implode(", ", $description);
+ $description = trim($count . " songs. " . implode(", ", $description));
}
if(
@@ -320,7 +320,7 @@ class sc{
$out["playlist"][] = [
"title" => $item["title"],
- "description" => $description,
+ "description" => $this->limitstrlen($description),
"author" => [
"name" => $item["user"]["username"],
"url" => $item["user"]["permalink_url"],
@@ -385,13 +385,14 @@ class sc{
"\n",
wordwrap(
str_replace(
- "\n",
+ ["\n\r", "\r\n", "\n", "\r"],
" ",
$text
),
300,
"\n"
- )
+ ),
+ 2
)[0];
}
}