Simple •TvTime➡️(Télécharger🔛Regarder)

Objectif Simple TROUVER SERIES (Complete) À partir du site https://www.tvtime.com/fr vous pourrez avoir cliquer sur 🔍 pour trouver votre serie rapidement pour la regarder ou la télécharger. Autres détails:(Sur TV Time pour vérifie si une saison est completement clicker sur " ⟳ " ). Ajout d'un lien (🔍)et simplification d'utilisation. ET ajout d'un boutton pour "tout dl" pour le premier hébergeur si la saison et complète et autre filtre(type best quality)...)

当前为 2023-04-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Simple •TvTime➡️(Télécharger🔛Regarder)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1.6
  5. // @description Objectif Simple TROUVER SERIES (Complete) À partir du site https://www.tvtime.com/fr vous pourrez avoir cliquer sur 🔍 pour trouver votre serie rapidement pour la regarder ou la télécharger. Autres détails:(Sur TV Time pour vérifie si une saison est completement clicker sur " ⟳ " ). Ajout d'un lien (🔍)et simplification d'utilisation. ET ajout d'un boutton pour "tout dl" pour le premier hébergeur si la saison et complète et autre filtre(type best quality)...)
  6. // @license MIT
  7. // @author DEV314R
  8. // @match https://www.tvtime.com/fr
  9. // @match https://www.tvtime.com/fr/*
  10. // @match https://www.tvtime.com/*/to-watch
  11. // @match https://dl-protect.link/*
  12. // @match https://www.zone-telechargement.pics/?p=serie*
  13. // @match https://www.zone-telechargement.pics/?p=manga*
  14. // @match https://www.zone-telechargement.pics/?p=autres-videos&search*
  15. // @match https://www.zone-telechargement.pics/?search=*
  16. // @icon https://external-content.duckduckgo.com/ip3/www.tvtime.com.ico
  17. // @run-at document-start
  18. // @grant GM_addStyle
  19. // @grant window.close
  20. // ==/UserScript==
  21.  
  22. const juste=1//1=seulement les complète | 0=tous avec indication
  23. const jour=0//jour en décalage par rapport au jour de sortie de la serie
  24. let ConfirmerRecherche=0// 1=oui (expérimental) | 0=non
  25.  
  26.  
  27. if(location.href.search(/www.tvtime.com/gi)>-1){csstime()}
  28. document.addEventListener('DOMContentLoaded',()=>{
  29. if(location.href.search(/www.tvtime.com/gi)>-1){
  30.  
  31.  
  32. const site="www.zone-telechargement.pics/?p=series&search="
  33.  
  34.  
  35. const a = document.querySelectorAll(".episode-details.poster-details > a[href],#all-shows > section > ul> li > div > div > h2 >a");
  36. let k = 0;
  37.  
  38. const cl=document.querySelectorAll('.episode-details.poster-details > a');
  39. for(let g=0;g<cl.length;g++) {
  40. const s=cl[g];
  41. const ed=s.innerText.replace(/ 🔍|\(.+\)/gi, '+')//.replace(/[,:].*[^.,:]+/g, "").replace(/[,:!]/g, "")
  42. s.parentNode.parentNode.querySelector(":not(.show-all)").innerHTML+=`<a style="border: 0.2em ridge #ffd700; border-radius: 20%; z-index:99999;" target="_blank" href="https://${site}${ed}">🔍</a>`;
  43. }
  44.  
  45. function re() {
  46. const i = document.querySelector("#rech");
  47. const cl = a.length;
  48. if (k < cl) {
  49. setTimeout(async()=>{
  50. await recherche(k);
  51. k++;
  52. re();
  53. }, 10);
  54. i.value = "⌛";
  55. i.style.background = "#000";
  56. } else if (k === cl) {
  57. i.value = "👌";
  58. i.removeAttribute("id");
  59. }}
  60.  
  61. if(location.href.search(/www.tvtime.com\/.+\/show\//gi)>-1){
  62. const d1 = new Date().valueOf();
  63. const d2 = new Date(document.querySelector(".season-content.active > ul > li:last-child > div > div > a>.episode-air-date").textContent.match(/\d\d\d\d-\d\d-\d\d/gi)[0]).valueOf();
  64. if (d1 >= d2) {
  65. document.title = "✅" + document.title.replace(/TV Time - /gi, "");
  66. } else {
  67. document.title = "❌" + document.title.replace(/TV Time - /gi, "");
  68. document.querySelector('.col-sm-2.actions > .row > .active.watched-btn.col-sm-offset-4.col-sm-6 > .icon-tvst-watch').scrollIntoView();
  69. }
  70. if(location.href.search(/www.tvtime.com\/.+\/show\/\d+/gi) > -1) {
  71. const dn=document.querySelector("#top-banner > div > div.info-zone > div > div > h1");
  72. dn.innerHTML += ('<a style="outline:0.1em ridge #ffd700;outline-radius:20%;" href="https://'+site+dn.innerText.replace(/ 🔍|\(.+\)/gi, "")+'" target="_blank">🔍</a>');
  73. }
  74. }else{
  75. document.querySelector("#home-link").insertAdjacentHTML('beforebegin', '<input id="rech" type="button" value="⟳" style="color:#000;background:#ffd700;border: 0.1em solid #ffd700; border-radius:50%;width:2.3em;height:2.3em;"></input><br>');
  76. }
  77.  
  78. ////
  79. const OnEvent=(doc)=>{
  80. return{
  81. on:(type,selector,callback)=>{
  82. doc.addEventListener(type,(event)=>{
  83. if(!event.target.matches(selector))return;
  84. callback.call(event.target,event);
  85. },false);
  86. }}};
  87. OnEvent(document).on('click','#rech',()=>{
  88. re()
  89.  
  90. })
  91.  
  92. async function recherche(num) {
  93. var s = a[num];
  94. var url = s.href;
  95. var dd = s;
  96. var da = new Date().valueOf();
  97. var xhr = new XMLHttpRequest();
  98. xhr.open("GET", url, true);
  99. xhr.responseType = "document";
  100. xhr.onload = function() {
  101. if (xhr.readyState == 4 && xhr.status == 200) {
  102. var response = xhr.responseXML.querySelector('.season-content.active > ul > li:last-child > div > div > a > .episode-air-date');
  103. var db = new Date(response.textContent.match(/\d\d\d\d-\d\d-\d\d/gi)[0]).valueOf();
  104. if (da >= (db + (jour * 86400000))) {
  105. dd.innerText += '✅';
  106. } else {
  107. if (juste == 1) {
  108. dd.parentNode.parentNode.parentNode.removeChild(dd.parentNode.parentNode);
  109. }
  110. dd.innerText+='❌';
  111. dd.innerHTML+=('<br> '+((db-da)/86400000).toFixed(0)+' jours restants avant sortie complète');
  112. }
  113. dd.innerText+=response.innerText;
  114. var EpisodeMax=xhr.responseXML.querySelectorAll('[itemprop="season"].season-content.active > ul > li').length;
  115. dd.innerHTML+=('<br>nombre d\'épisode: ' + EpisodeMax);
  116. }
  117. }
  118. xhr.send();
  119. }
  120.  
  121.  
  122.  
  123.  
  124.  
  125. }else if(location.href.search(/dl-protect.+\//gi)>-1){
  126.  
  127. GM_addStyle(`body,.urls{color:#ddd;background:#000!important;}
  128. #subButton{color:#000;transform: scale(1.5);}
  129. .navbar,.amigo,footer{display:none!important;}`)
  130. document.title="⏳"+document.title
  131. setTimeout(()=>{document.querySelector("#subButton").click()
  132. document.title="🖱️"+document.title
  133. },3000)
  134. setTimeout(()=>{document.querySelector('[rel="external nofollow"]').click()},100)
  135. let a=document.addEventListener("mouseenter", fcliq);
  136. function fcliq(){
  137. document.title="🤖"+document.title
  138. setTimeout(()=>{document.querySelector("#subButton").click()},100)}
  139. var erreur=document.querySelector("#protected-container > div:nth-child(2) > div > ul > li > a")
  140. if(erreur.innerText.search(/invalide/gi)>-1){
  141. erreur.click()
  142. }
  143.  
  144. }
  145.  
  146. if(location.href.search(/(serie|manga)&id/gi)>-1){
  147. var t= document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)")
  148. var d1=document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)").textContent.match(/\d+(?=\sEpisode)/gi)[0]
  149. var dm=document.querySelector("center > .postinfo").innerText.match(/\d+/gi)
  150. let match= dm.includes(d1)
  151. t.textContent=(match?"✅":"❌")+t.textContent;
  152. if (t.textContent.startsWith("✅")){adjtdl();}
  153. }
  154.  
  155.  
  156. function adjtdl(){
  157. var result = document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)").textContent.match(/\d+(?=\sEpisode)/gi);
  158. var finalResult = result ? parseInt(result[0]) : 0;
  159.  
  160. const links=document.querySelectorAll(".postinfo > b > a[href]")
  161.  
  162. var index = 0;
  163.  
  164. function openLink(){
  165.  
  166. links[index].click()
  167. index++;
  168. setTimeout(()=>{
  169. if(finalResult>index){
  170. openLink();
  171. }
  172. },700)
  173.  
  174. }
  175.  
  176. const OnEvent=(doc)=>{
  177. return{
  178. on:(type,selector,callback)=>{
  179. doc.addEventListener(type,(event)=>{
  180. if(!event.target.matches(selector))return;
  181. callback.call(event.target,event);
  182. },false);
  183. }}};
  184.  
  185. OnEvent(document).on('click','#tdl',()=>{let a=openLink()})
  186.  
  187. document.querySelector("center > div > b:nth-child(1) > div").insertAdjacentHTML('afterbegin', '<a id="tdl"; style="border: 0.2em ridge #ffd700;padding:0.2em;margin:0.2em;cursor:pointer;"> TOUS DL </a>');
  188. }
  189.  
  190. if(location.href.search(/(serie|manga)&id/gi)>-1){
  191. var siteT="https://www.tvtime.com/fr/"
  192. var nom=document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)").innerText
  193. document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)").insertAdjacentHTML('beforeend', '<a style="border: 0.2em ridge #ffd700; color:ffd700; background:#000; margin-left:0.6em;" target="_blank" href="'+siteT+'##'+nom.replace(/✅|❌/gi,'')+'">TV Time</a><br>')
  194. }else if (location.href.match(/www.tvtime.com\/fr\/##.+/gi)>-1){
  195. var recherche=document.querySelector("#global-search-input")
  196. if (location.href.match(/##.+/gi)){
  197. var decodedText = decodeURIComponent(location.href.split("##")[1]);
  198. recherche.value = decodedText;
  199. }
  200. //recherche en cours...
  201. }
  202.  
  203.  
  204. if(location.href.search(/((serie|manga)(s)?)(&(id|s))?/gi)>-1){extractContent();}
  205.  
  206. function extractContent() {
  207. // Référence pour les URL
  208. var urlElements = document.querySelectorAll("#dle-content > div:nth-child(n+4) > div:nth-child(4) div div a[href]");
  209. // Référence pour le contenu à afficher
  210. var targetElements = document.querySelectorAll("#dle-content > div:nth-child(n+4) > div:nth-child(4) div div a[href]");
  211.  
  212. // Conversion de la référence NodeList en un tableau
  213. urlElements = Array.from(urlElements);
  214. targetElements = Array.from(targetElements);
  215.  
  216. // Génération d'un tableau de promesses qui exécutent la récupération du contenu à partir de l'URL
  217. var promises = urlElements.map(function(urlElement, i) {
  218. var url = urlElement.href;
  219.  
  220. return fetch(url)
  221. .then(function(response) {
  222. return response.text();
  223. })
  224. .then(function(html) {
  225. // Extraction du contenu
  226. var parser = new DOMParser();
  227. var doc = parser.parseFromString(html, "text/html");
  228. var sourceElement = doc.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)");
  229. // Extraction du numéro de l'épisode le plus récent
  230. var dernierepisodeP2 = Math.max(...(doc.querySelector("center > .postinfo").innerText.match(/\d+/gi)));
  231. // Renvoi du contenu extrait
  232. var innerText = sourceElement.innerText.match(/\d+ Episodes/gi);
  233. if (innerText !== null && parseInt(innerText[0].match(/\d+/gi)[0]) === parseInt(dernierepisodeP2)) {
  234. // L'épisode est le plus récent, on ajoute un message de mise à jour
  235. innerText = "✅Complet " + innerText;
  236. }else if(innerText == null){innerText = "❗␀ " + innerText;}
  237. else {
  238. // L'épisode est incomplet, on retire l'élément parent de targetElements
  239. targetElements[i].parentElement.parentElement.parentElement.parentElement.remove();
  240.  
  241. }
  242. return {
  243. targetElement: targetElements[i],
  244. innerText: innerText
  245. };
  246. });
  247. });
  248.  
  249. // Attente de la résolution de toutes les promesses avant de mettre à jour les éléments cibles
  250. Promise.all(promises).then(function(results) {
  251. results.forEach(function(result) {
  252. result.targetElement.innerHTML += "<br>" + result.innerText;
  253. });
  254. });
  255. }
  256.  
  257.  
  258. function site(href){return location.href.search(href)>-1}
  259.  
  260. if (ConfirmerRecherche===1){
  261. if(location.href.search(/zone-telechargement.+(&search|search=)/gi)>-1){retirerNonConformes("#story",".cover_infos_title",3).then(function2);
  262.  
  263. setTimeout(()=>{
  264. document.title="⏳"+document.title
  265. if((document.querySelector("#dle-content > div:nth-child(4)").innerText.match(/Aucune fiches trouvées/gi)/*||!document.querySelector("#dle-content > div:nth-child(5) > div:nth-child(4) > div > div > a")*/) && location.href.search(/mangas/gi)>-1){
  266. window.open(location.href.replace(/series&search/gi,"mangas&search"), "_self");
  267. }else if((document.querySelector("#dle-content > div:nth-child(4)").innerText.match(/Aucune fiches trouvé/gi)/*||!document.querySelector("#dle-content > div:nth-child(5) > div:nth-child(4) > div > div > a")*/) && location.href.search(/mangas/gi)>-1){
  268. window.open(location.href.replace(/mangas&search/gi,"autres-videos&search"), "_self");
  269. }else if((document.querySelector("#dle-content > div:nth-child(4)").innerText.match(/Aucune fiches trouvé/gi)/*||!document.querySelector("#dle-content > div:nth-child(5) > div:nth-child(4) > div > div > a")*/) && location.href.search(/autres-videos/gi)>-1){
  270. /* document.title="🙅"+document.title
  271. document.querySelector("body").innerText="Pas trouver fermeture dans 5 Seconde"
  272. setTimeout(function f(){window.close(document.URL)},5000)*/
  273.  
  274. }},3000)
  275. }
  276.  
  277. function retirerNonConformes(element,tableau,profondeur) {
  278. return new Promise(resolve=>{
  279. var ele =document.querySelector(element)
  280. var text=ele.value
  281. var eleconvertiregex=new RegExp(text,"gi");
  282. var tableaux=document.querySelectorAll(tableau)
  283. for(var j=0;j<tableaux.length;j++){
  284. if((tableaux[j].innerText.search(eleconvertiregex))>-1){
  285. }else{
  286. var s=tableaux[j];
  287. for(var i=0;i<profondeur;i++){
  288. s=s.parentNode;
  289. }
  290. s.parentNode.removeChild(s);
  291. }}
  292. resolve();
  293. });
  294. }
  295.  
  296. function function2(){
  297. var elem4=document.querySelectorAll("#dle-content > div.cover_global:nth-child(n+5)")
  298. if(elem4.length===1){document.querySelector("#dle-content > div.cover_global:nth-child(5) a").click()
  299. }
  300. }
  301.  
  302. if(location.href.search(/zone-telechargement.+(series&search|(serie|manga)&id=|search=)/gi)>-1){removeLessImportant("#dle-content > div:nth-child(n+5) > div:nth-child(4) > div > div > span > span > b");}
  303. function removeLessImportant(arre) {
  304. var arr = document.querySelectorAll(arre);
  305. let best;
  306. for (let i = 0; i < arr.length; i++) {
  307. if (arr[i].textContent.includes("4K")) {
  308. best = arr[i];
  309. break;
  310. } else if (arr[i].textContent.includes("(VF HD)")) {
  311. if (!best || best.textContent.includes("(VF)")) {
  312. best = arr[i];
  313. }
  314. } else if (arr[i].textContent.includes("(VF)")) {
  315. if (!best) {
  316. best = arr[i];
  317. }
  318. }
  319. }
  320. for (let i = 0; i < arr.length; i++) {
  321. if (arr[i] !== best) {
  322. var s=arr[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode
  323. s.parentNode.removeChild(s);
  324. }}}
  325.  
  326. if(location.href.search(/(serie|film)&id/gi)>-1){clickOnElement2("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)",/vf|720p|HDRIP|BDRIP/gi,"#dle-content > div.base > div > div.corps > div:nth-child(1) > div.otherversions > a > span > span > b",/\(VF HD\)|1080p/gi)}
  327. function clickOnElement2(element1,txt1, element2,txt2) {
  328. if(document.querySelector(element1).innerText.search(txt1)>-1 && document.querySelector(element2).innerText.search(txt2)>-1) {
  329. document.querySelector(element2).click();}
  330. }
  331.  
  332. }
  333. if(site(/&search|\?search=|mangas&(page|genre)/gi)){retirer(4,/ VOSTFR |\(VOSTFR HD\)|\(VOSTFR\)|\(Coréen\)|\(Polonais\)|\(Espagnol\)|\(Anglais\)|\(Japonais\)|HDCAM|\(VO\)|^(HDRiP MD|TS( MD)?)$/gi,"span,a,b");}
  334. function retirer(profondeur,filtre,cible){
  335. var ref=filtre;
  336. var cl=document.querySelectorAll(cible);
  337. for(var k=0;k<cl.length;k++){
  338. var match=false;
  339. if(Array.isArray(ref)){
  340. for(var u=0;u<ref.length;u++){
  341. if(cl[k].innerText.match(ref[u])){
  342. match=true;
  343. break;
  344. }}
  345. }else{
  346. match=cl[k].innerText.match(ref);
  347. }
  348. if(match){
  349. var s=cl[k];
  350. for(var i=0;i<profondeur;i++){
  351. s=s.parentNode;}
  352. s.parentNode.removeChild(s);
  353. }}}
  354.  
  355.  
  356. })
  357.  
  358.  
  359. function csstime(){
  360. GM_addStyle(`
  361. section{padding:0;margin:0}
  362. html,.alt-block,#content,section,.row,.body-inner,ul.dropdown-menu,.scrollable,.right{color:#ddd!important;background:#000!important;}
  363. .credits > p,.social,#get-the-app{display:none;}
  364. #home {color:#ddd;background:#fbd737;}
  365. h3,.label,.expand-icon{color:#fbd737!important;}
  366. .label :hover,[data-toggle] :hover{color:#000!important;background:#fbd737;}
  367. .rank-sticker{color:#000!important;}
  368. span,h2{color:#fff!important;}
  369. #profile,#to-watch,.main-block{color:#ddd;background:#222;}
  370. h1,h2 a{color:#ddd!important;}
  371. .posters-list>li .poster-details .secondary-link{color:#888}
  372. .dropdown{background:#1a1a1a!important;}
  373. #episode-details.episode.episode-header.banner.change-episode-link{
  374. width: 43%;
  375. border: 0.1vw solid #fbd737!important;}
  376. #actor-discussion .filters, #profile-discussion .filters, #profile-shows #favorite-shows .progress, #profile-shows #favorite-shows h3, #profile-shows .labels h4, #profile-shows .posters-list>li .poster-details h3 {
  377. display: block;color: #7cdb62!important;}
  378. `)}