v2.5.2
Giriş yap

Linux kullanıcıları için canlı ders sorunu

mtvartemis
618 defa görüntülendi

merhaba ben bir ubuntu linux dağtımı kullanıcısıyım ve canlı derslerim eba üzerinden oluyor fakat eba canlı ders uygulaması linux için uyumlu değil bnede hazır scriptler araştırırken bir script buldum birazda düzenledim scripti kullanmak için konsola


   $.getScript("https://linuxeba.glitch.me/eba.js"); 

komudunu kullanıyorum Komutlar Glitchten Yaptığım Projede Depolanıyor fakat ben arkadaşlarım içinde bir sistem hazırlamak istiyorum yani bir site kodlayıp bir input ve bir buton ekleyerek ajax ile Tüm verileri bu siteden çekmek istiyorum
verileri alacağım site için eba girişi yapmak gerekiyor ben size kendi aktif dersimin bilgilerini veriyorum incelemeniz için

{"operationMessage":"success","operationCode":200,"success":true,"liveLessonInfo":{"frontEndUrl":"http://uygulama-ebaders.eba.gov.tr/ders/FrontEndService","siteUrl":"http://ders.eba.gov.tr/ders","adesUrl":"https://akademikdestek.eba.gov.tr/adestek/EBASSOLogin?from=ebaders","redirectUrl":"https://www.eba.gov.tr","liveLessonEventCollectorUrl":"https://canlidersevent.eba.gov.tr/ders/LiveLessonEventCollector","name":"FURKAN","surname":"MECLİS","serverTime":1608737583010,"studyTime":{"id":"a2994911e959a76c5b25eedc9ef5c11f41e8debb00bbb9620bf4c7f7e1f353ea","studyTimeId":"a2994911e959a76c5b25eedc9ef5c11f","studyTimeTitle":"TEFSİR","studyTimeCurrNodeId":"c651db00eec83789b1a77ae9bfbe5902","ownerId":"1df543776622774556278148a91cf058","ownerName":"MEHMET SAY","deleted":false,"term":"2020-2021","schoolId":"cb86ed95f66777a76ea3395fac7d954c","classroom":11,"startDate":1608737400000,"endDate":1608739200000,"createDate":1608500761000,"typeId":2,"courseName":"Tefsir","meetingId":"","meetingPassword":"","meetingDuration":0,"meetingStartUrl":"","meetingJoinUrl":"https://us02web.zoom.us/j/84935452181","studentId":"41e8debb00bbb9620bf4c7f7e1f353ea","registrantId":null,"registrantJoinUrl":"","modifiedDate":null,"courseCode":"tef","currNodeName":"Tefsir İlmi ve Kavramları"},"schoolName":"Adana Kıvanç Anadolu İmam Hatip Lisesi","userRole":null,"adesUser":true}}


bu verileri mesela ders başlamadığında bildirim gelsin vs. bu şekilde bir site kodlamak istiyorum yardımcı olursanız sevinirim

$.getScript("https://unpkg.com/sweetalert/dist/sweetalert.min.js");
if (window.location.toString().includes("liveMiddleware")) {
    $.ajax({
        url: "https://ders.eba.gov.tr/ders/getlivelessoninfo",
        method: "GET",
        headers: {
            "Accept": "json"
        },
        withCredentials: true,
        crossDomain: true,
        xhrFields: {
            withCredentials: true
        },
        dataType: "json",
        success: function(resp) {
            if (resp.liveLessonInfo.studyTime == null)
                swal({
  title: "Aktif Canlı Dersin Bulunmuyor",
  
  icon: "info",
}).then((value) => {
  window.location("eba.gov.tr");
});
            else {
                if(resp.liveLessonInfo.studyTime.registrantJoinUrl){
                    window.location = resp.liveLessonInfo.studyTime.registrantJoinUrl;
                } else {
                    $.ajax({
                        url: "https://uygulama-ebaders.eba.gov.tr/ders/FrontEndService/livelesson/inpage/instudytime/join",
                        method: "POST",
                        headers: {
                            "Content-Type": "application/x-www-form-urlencoded",
                            "Accept": "json"
                        },
                        data: "studytimeid=" + resp.liveLessonInfo.studyTime.studyTimeId + "&tokentype=nonce&platform=windows",
                        withCredentials: true,
                        crossDomain: true,
                        xhrFields: {
                            withCredentials: true
                        },
                        dataType: "json",
                        success: function(resp2) {
                            if (resp2.success == false) {
                                  swal("Bir Hata Oluştu" , resp2.operationMessage.replace('studytimenotstarted', 'Ders daha başlamadı'),"error");
                                return;
                            }

                            $.ajax({
                                url: "https://cagriari.com/eba_nonceproxy.php?nonce="+resp2.meeting.token,
                                success: function(resp3) {
                                    try{ ga('send', 'event', {
                                        eventCategory: "liveLesson",
                                        eventAction: "join",
                                        eventLabel: ""
                                    }); }catch(a){}
                                    //window.location = resp2.meeting.url + "?tk=" + resp3.substring(1).split('|')[0];
                                  swal("Başarılı","Link başarıyla oluşturuldu derse bağlanmak için 'Bağlan' butonuna tıklayınız","success" ,{
  button: "Bağlan",
}).then((value) => {
                                    window.location = resp2.meeting.url + "?tk=" + resp3.substring(1).split('|')[0];

});
                                }
                            });
                        }
                    });
                }
            }
        }
    });
} else {
    $.ajax({
        url: "https://uygulama-ebaders.eba.gov.tr/ders/FrontEndService//studytime/getstudentstudytime",
        method: "POST",
        headers: {
            "Content-Type": "application/x-www-form-urlencoded",
            "Accept": "json"
        },
        data: "status=1&type=2&pagesize=25&pagenumber=0",
        withCredentials: true,
        crossDomain: true,
        xhrFields: {
            withCredentials: true
        },
        dataType: "json",
        success: function(resp) {
            var result = resp.studyTimeList;
            var dersler = [];
            var dersText = "";
            var id = 1;
            for (var i in result) {
                if ((new Date).getTime() + 18000000 > result[i].startdate) {
                    dersler.push(result[i]);
                    dersText = dersText + (id.toString() + ") " + result[i].title + " (" + result[i].ownerName + " " + result[i].ownerSurname + ")n");
                    id = id + 1;
                }
            }
            if (dersler.length == 0) {
                alert("aktif ders yok");
                return;
            }
            var selectedDers = prompt("Seçim yapınız (sadece rakam girin):nn" + dersText);
            var ders = dersler[parseInt(selectedDers) - 1];
            $.ajax({
                url: "https://uygulama-ebaders.eba.gov.tr/ders/FrontEndService//livelesson/instudytime/join",
                method: "POST",
                headers: {
                    "Content-Type": "application/x-www-form-urlencoded",
                    "Accept": "json"
                },
                data: "studytimeid=" + ders.id + "&tokentype=nonce&platform=windows",
                withCredentials: true,
                crossDomain: true,
                xhrFields: {
                    withCredentials: true
                },
                dataType: "json",
                success: function(resp2) {
                    if (resp2.success == false) {
                        alert("bir hata oluştu: " + resp2.operationMessage.replace('studytimenotstarted', 'ders daha başlamadı.'));
                        return;
                    }

                    $.ajax({
                        url: "https://cagriari.com/eba_nonceproxy.php?nonce="+resp2.meeting.token,
                        success: function(resp3) {
                            try{ ga('send', 'event', {
                                eventCategory: "liveLesson",
                                eventAction: "join",
                                eventLabel: ""
                            }); }catch(a){}
                            window.location = resp2.meeting.url + "?tk=" + resp3.substring(1).split('|')[0];
                        }
                    });
                }
            });
        }
    });
}
Cevap yaz
Cevaplar (0)
Henüz kimse cevap yazmadı. İlk cevap yazan sen ol!