Created
May 16, 2021 13:52
-
-
Save rohitsahu4/0b40fc1443b9362ea5c6d689a47c17d3 to your computer and use it in GitHub Desktop.
Udemy course video auto complete bot. ( Finish your udemy course fast by pasting this script in dev console. ) (content like articles may need to be views seperatly ).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy | |
var s; | |
function isArticle(){ | |
return document.querySelector('[class*="curriculum-item-link--is-current"]').querySelector('[class="udi udi-article"]') | |
} | |
function foo(){ | |
var video = document.querySelector('video'); | |
try{ | |
if(video){ | |
if(!video.paused){ | |
video.currentTime=video.duration-1; | |
setTimeout(function(){ | |
foo() | |
},5000) | |
} | |
else{ | |
video.play() | |
setTimeout(function(){ | |
foo() | |
},5000) | |
} | |
} | |
else if(document.querySelector('[aria-labelledby="go-to-next-item"]') && !!isArticle()){ | |
setTimeout(function(){ | |
document.querySelector('[aria-labelledby="go-to-next-item"]').click() | |
foo(); | |
},30000) | |
} | |
else{ | |
if(document.querySelector('[data-purpose="next-item"]')) | |
document.querySelector('[data-purpose="next-item"]').click(); | |
setTimeout(function(){ | |
foo() | |
},5000) | |
} | |
} | |
catch(e){ | |
console.log(e) | |
setTimeout(function(){ | |
foo() | |
},500) | |
} | |
} | |
foo() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dont judge my code i wrote this in frustation.