portail tube stats calling api not rss

This commit is contained in:
mose 2022-07-19 22:54:41 +08:00
parent f79fb7d80e
commit e50de1e1f2
2 changed files with 7 additions and 7 deletions

View file

@ -10,7 +10,7 @@ wget -O ./site/data/wiki.json https://wiki.crapaud-fou.org/stats.php
wget -O ./site/data/rencontres.json https://wiki.crapaud-fou.org/rencontres.php
# tube
wget -O ./site/data/tube.json "https://tube.crapaud-fou.org/feeds/videos.json?sort=-publishedAt&filter=local"
wget -O ./site/data/tube.json "https://tube.crapaud-fou.org/api/v1/videos?sort=-publishedAt&isLocal=1&count=10"
# chat
# wget -O ./site/data/chat_stat_monthly.json https://idees.crapaud-fou.org/data/chat_stat_monthly.json

View file

@ -108,17 +108,17 @@ $(document).ready(function() {
// cratube
$.getJSON("data/tube.json", function(data) {
$.each(data.items.slice(0, 10), function(index, video) {
$.each(data.data.slice(0, 10), function(index, video) {
var link = $("<a>")
.attr("href", video.url)
.attr("href", "https://tube.crapaud-fou.org/w/" + video.shortUUID)
.attr("class", "list-item")
.attr("title", video.title)
.text(video.title);
.attr("title", video.name)
.text(video.name);
var li = $("<li>").append(link);
$(".tube ul").append(li);
$(".lastvideo")
.attr("src", data.items[0].id.replace("watch", "embed"))
.attr("title", data.items[0].title);
.attr("src", "https://tube.crapaud-fou.org/" + data.data[0].embedPath)
.attr("title", data.data[0].name);
});
});