Answer the question
In order to leave comments, you need to log in
How to add a track to twitch-dj using a request?
I want to make a bot that will add music itself.
Searching, I found this query
post("/includes/back.php?func=add_track&channel=" + id, {
url: $("#url").val(),
author: $("#author").val()
}
function add_track(id) {
if ($("#url").val() && $("#author").val()) {
Cookies.set('author_dj', $("#author").val(), {
expires: 365,
path: ''
});
$("#add_track_b").button('disable');
$("#add_track_b").button('option', 'label', '<img src="/template/img/wait_m.gif">');
$.post("/includes/back.php?func=add_track&channel=" + id, {
url: $("#url").val(),
author: $("#author").val()
}, function(data) {
var info = JSON.parse(data);
if (info.pay) {
iarray.robokassa_url = info.robokassa_url;
iarray.freekassa_url = info.freekassa_url;
iarray.unitpay_url = info.unitpay_url;
iarray.unitpay_url3 = info.unitpay_url3;
iarray.unitpay_id = info.pay;
iarray.unitpay_desc = info.desc;
iarray.unitpay_sum = info.sum3;
$("#wm_form").html(info.webmoney_form);
$('#tabs-demo').tabs('option', 'active', 2);
} else {
if (info.success == 1) {
playlist(id);
$(".new-track-1 a").click();
$("#add_track_b").button('enable');
} else {
d_error(info.error);
$("#add_track_b").button('enable');
}
}
$("#url").val("");
$("#add_track_b").button('option', 'label', '<img src="/template/img/send-music.png"> Отправить');
}).fail(function(xhr) {
location.reload();
});
} else {
d_error("Заполните все поля!");
}
}
Writing with python requests
Answer the question
In order to leave comments, you need to log in
I DECIDED!
POST url: https://twitch-dj.ru/includes/back.php?func=add_tr... channel %
parameters = {
url: "%Ссылка на видео%", //Может быть нужно без ""
author:"%Автор%"
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question