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-03-10 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Simple •TvTime➡️(Télécharger🔛Regarder)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.1
  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.net/*
  12. // @match https://www.zone-telechargement.co/?p=serie*
  13. // @match https://www.zone-telechargement.co/?p=manga*
  14. // @match https://www.zone-telechargement.co/?p=autres-videos&search*
  15. // @icon https://icons.duckduckgo.com/ip2/tvtime.com.ico
  16. // @run-at document-start
  17. // @grant GM_addStyle
  18. // @grant window.close
  19. // ==/UserScript==
  20. if(location.href.search(/www.tvtime.com/gi)>-1){csstime()}
  21. document.addEventListener('DOMContentLoaded',()=>{
  22. if(location.href.search(/www.tvtime.com/gi)>-1){
  23.  
  24.  
  25. const juste=1//1=seulement les complète | 0=tous avec indication
  26. const jour=0//jour en décalage par rapport au jour de sortie de la serie
  27.  
  28. var site="www.zone-telechargement.co/?p=series&search="
  29.  
  30.  
  31. const a = document.querySelectorAll(".episode-details.poster-details > a[href],#all-shows > section > ul> li > div > div > h2 >a");
  32. let k = 0;
  33.  
  34.  
  35. const cl=document.querySelectorAll('.episode-details.poster-details > a');
  36. for(let g=0;g<cl.length;g++) {
  37. const s=cl[g];
  38. const ed=s.innerText;
  39. s.parentNode.parentNode.firstElementChild.innerHTML+=`<a style="border: 0.2em ridge #ffd700; border-radius: 20%;" target="_blank" href="https://${site}${ed.replace(/ 🔍|\(.+\)/gi, '+')}">🔍</a>`;
  40. }
  41.  
  42.  
  43. function re() {
  44. const i = document.querySelector("#rech");
  45. const cl = a.length;
  46. if (k < cl) {
  47. setTimeout(async()=>{
  48. await recherche(k);
  49. k++;
  50. re();
  51. }, 10);
  52. i.value = "⌛";
  53. i.style.background = "#000";
  54. } else if (k === cl) {
  55. i.value = "👌";
  56. i.removeAttribute("id");
  57. }}
  58.  
  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.  
  93. async function recherche(num) {
  94. var s = a[num];
  95. var url = s.href;
  96. var dd = s;
  97. var da = new Date().valueOf();
  98. var xhr = new XMLHttpRequest();
  99. xhr.open("GET", url, true);
  100. xhr.responseType = "document";
  101. xhr.onload = function() {
  102. if (xhr.readyState == 4 && xhr.status == 200) {
  103. var response = xhr.responseXML.querySelector('.season-content.active > ul > li:last-child > div > div > a > .episode-air-date');
  104. var db = new Date(response.textContent.match(/\d\d\d\d-\d\d-\d\d/gi)[0]).valueOf();
  105. if (da >= (db + (jour * 86400000))) {
  106. dd.innerText += '✅';
  107. } else {
  108. if (juste == 1) {
  109. dd.parentNode.parentNode.parentNode.removeChild(dd.parentNode.parentNode);
  110. }
  111. dd.innerText += '❌';
  112. dd.innerHTML += ('<br> ' + ((db - da) / 86400000).toFixed(0) + ' jours restants avant sortie complète');
  113. }
  114. dd.innerText += response.innerText;
  115. var EpisodeMax = xhr.responseXML.querySelectorAll('[itemprop="season"].season-content.active > ul > li').length;
  116. dd.innerHTML += ('<br>nombre d\'épisode: ' + EpisodeMax);
  117. }
  118. }
  119. xhr.send();
  120. }
  121.  
  122.  
  123.  
  124.  
  125.  
  126. }else if(location.href.search(/dl-protect.net/gi)>-1){
  127.  
  128. GM_addStyle(`body,.urls{color:#ddd;background:#000!important;}
  129. #subButton{color:#000;transform: scale(1.5);}
  130. .navbar,.amigo,footer{display:none!important;}`)
  131. document.title="⏳"+document.title
  132. setTimeout(()=>{document.querySelector("#subButton").click()
  133. document.title="🖱️"+document.title
  134. },3000)
  135. setTimeout(()=>{document.querySelector('[rel="external nofollow"]').click()},100)
  136. let a=document.addEventListener("mouseenter", fcliq);
  137. function fcliq(){
  138. document.title="🤖"+document.title
  139. setTimeout(()=>{document.querySelector("#subButton").click()},100)}
  140. var erreur=document.querySelector("#protected-container > div:nth-child(2) > div > ul > li > a")
  141. if(erreur.innerText.search(/invalide/gi)>-1){
  142. erreur.click()
  143. }
  144.  
  145. }
  146.  
  147.  
  148. if(location.href.search(/(serie|manga)&id/gi)>-1){
  149. var t= document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)")
  150. 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]
  151. var d2=document.querySelector(".postinfo > :last-of-type>a").textContent.match(/\d+/gi)[0]
  152. let match= d1==d2;
  153. t.textContent=(match?"✅":"❌")+t.textContent;
  154. if (t.textContent.startsWith("✅")){adjtdl();}
  155. }
  156.  
  157. 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");}
  158. function removeLessImportant(arre) {
  159. var arr = document.querySelectorAll(arre);
  160. let best;
  161. for (let i = 0; i < arr.length; i++) {
  162. if (arr[i].textContent.includes("4K")) {
  163. best = arr[i];
  164. break;
  165. } else if (arr[i].textContent.includes("(VF HD)")) {
  166. if (!best || best.textContent.includes("(VF)")) {
  167. best = arr[i];
  168. }
  169. } else if (arr[i].textContent.includes("(VF)")) {
  170. if (!best) {
  171. best = arr[i];
  172. }
  173. }
  174. }
  175. for (let i = 0; i < arr.length; i++) {
  176. if (arr[i] !== best) {
  177. var s=arr[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode
  178. s.parentNode.removeChild(s);
  179. }}}
  180. /*
  181. 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)}
  182.  
  183. function clickOnElement2(element1,txt1, element2,txt2) {
  184. if (document.querySelector(element1).innerText.search(txt1)>-1 && document.querySelector(element2).innerText.search(txt2)>-1) {
  185. document.querySelector(element2).click();
  186. }}
  187. */
  188.  
  189. function adjtdl(){
  190. var result = document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)").textContent.match(/\d+(?=\sEpisode)/gi);
  191. var finalResult = result ? parseInt(result[0]) : 0;
  192.  
  193. const links=document.querySelectorAll(".postinfo > b > a[href]")
  194.  
  195. var index = 0;
  196.  
  197. function openLink(){
  198.  
  199. links[index].click()
  200. index++;
  201. setTimeout(()=>{
  202. if(finalResult>index){
  203. openLink();
  204. }
  205. },700)
  206.  
  207. }
  208.  
  209. const OnEvent=(doc)=>{
  210. return{
  211. on:(type,selector,callback)=>{
  212. doc.addEventListener(type,(event)=>{
  213. if(!event.target.matches(selector))return;
  214. callback.call(event.target,event);
  215. },false);
  216. }}};
  217.  
  218. OnEvent(document).on('click','#tdl',()=>{let a=openLink()})
  219.  
  220. 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>');
  221. }
  222.  
  223.  
  224. if(location.href.search(/(serie|manga)&id/gi)>-1){
  225. var siteT="https://www.tvtime.com/fr/"
  226. var nom=document.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(3)").innerText
  227. 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>')
  228. }else if (location.href.match(/www.tvtime.com\/fr\/##.+/gi)>-1){
  229. var recherche=document.querySelector("#global-search-input")
  230. if (location.href.match(/##.+/gi)){
  231. var decodedText = decodeURIComponent(location.href.split("##")[1]);
  232. recherche.value = decodedText;
  233. }
  234. //recherche en cours...
  235. }
  236.  
  237.  
  238.  
  239. if(location.href.search(/((serie|manga)(s)?)(&(id|s))?/gi)>-1){extractContent();}
  240.  
  241. function extractContent() {
  242. // Référence pour les URL
  243. var urlElements = document.querySelectorAll("#dle-content > div:nth-child(n+4) > div:nth-child(4) div div a[href]");
  244. // Référence pour le contenu à afficher
  245. var targetElements = document.querySelectorAll("#dle-content > div:nth-child(n+4) > div:nth-child(4) div div a[href]");
  246.  
  247. // Conversion de la référence NodeList en un tableau
  248. urlElements = Array.from(urlElements);
  249. targetElements = Array.from(targetElements);
  250.  
  251. // Génération d'un tableau de promesses qui exécutent la récupération du contenu à partir de l'URL
  252. var promises = urlElements.map(function(urlElement, i) {
  253. var url = urlElement.href;
  254.  
  255. return fetch(url)
  256. .then(function(response) {
  257. return response.text();
  258. })
  259. .then(function(html) {
  260. // Extraction du contenu
  261. var parser = new DOMParser();
  262. var doc = parser.parseFromString(html, "text/html");
  263. var sourceElement = doc.querySelector("#dle-content > div.base > div > div.corps > div:nth-child(1) > div:nth-child(4)");
  264. // Extraction du numéro de l'épisode le plus récent
  265. var dernierepisodeP2 = doc.querySelector(".postinfo > :last-of-type>a").textContent.match(/\d+/gi)[0];
  266. // Renvoi du contenu extrait
  267. var innerText = sourceElement.innerText.match(/\d+ Episodes/gi);
  268. if (innerText !== null && parseInt(innerText[0].match(/\d+/gi)[0]) === parseInt(dernierepisodeP2)) {
  269. // L'épisode est le plus récent, on ajoute un message de mise à jour
  270. innerText = "✅Complet " + innerText;
  271. }else if(innerText == null){innerText = "❗␀ " + innerText;}
  272. else {
  273. // L'épisode est incomplet, on retire l'élément parent de targetElements
  274. targetElements[i].parentElement.parentElement.parentElement.parentElement.remove();
  275.  
  276. }
  277. return {
  278. targetElement: targetElements[i],
  279. innerText: innerText
  280. };
  281. });
  282. });
  283.  
  284. // Attente de la résolution de toutes les promesses avant de mettre à jour les éléments cibles
  285. Promise.all(promises).then(function(results) {
  286. results.forEach(function(result) {
  287. result.targetElement.innerHTML += "<br>" + result.innerText;
  288. });
  289. });
  290. }
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297. setTimeout(()=>{
  298. 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(/series&search/gi)>-1){
  299. window.open(location.href.replace(/series&search/gi,"mangas&search"), "_self");
  300.  
  301. }else
  302. 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&search/gi)>-1){
  303. window.open(location.href.replace(/mangas&search/gi,"autres-videos&search"), "_self");
  304. }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){
  305. document.title="🙅"+document.title
  306. document.querySelector("body").innerText="Pas trouver fermeture dans 5 Seconde"
  307. setTimeout(function f(){window.close(document.URL)},5000)
  308.  
  309. }},3000)
  310.  
  311.  
  312. })
  313.  
  314. function csstime(){
  315. GM_addStyle(`
  316. section{padding:0;margin:0}
  317. html,.alt-block,#content,section,.row,.body-inner,ul.dropdown-menu,.scrollable,.right{color:#ddd!important;background:#000!important;}
  318. .credits > p,.social,#get-the-app{display:none;}
  319. #home {color:#ddd;background:#fbd737;}
  320. h3,.label,.expand-icon{color:#fbd737!important;}
  321. .label :hover,[data-toggle] :hover{color:#000!important;background:#fbd737;}
  322. .rank-sticker{color:#000!important;}
  323. span,h2{color:#fff!important;}
  324. #profile,#to-watch,.main-block{color:#ddd;background:#222;}
  325. h1,h2 a{color:#ddd!important;}
  326. .posters-list>li .poster-details .secondary-link{color:#888}
  327. .dropdown{background:#1a1a1a!important;}
  328. #episode-details.episode.episode-header.banner.change-episode-link{
  329. width: 43%;
  330. border: 0.1vw solid #fbd737!important;}
  331. #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 {
  332. display: block;color: #7cdb62!important;}
  333.  
  334. body,#header,b,.top-title,[class*="content"],.blockbox,ul li,[style] a,[style],.imdbRating,.top-year,div.message_box.berrors,.container,.s_mid,.s_left{color:#dfdfdf!important;background:#000!important;border-color:#000;}
  335. button,img,[src]{color:#000!important;background:#eee!important;}
  336. .quote,[name="search"]{color:#bbb!important;background:#333!important;}
  337. div,p,table,td,blockquote,li,ul{padding-top:0!important;margin-top:0!important;margin-bottom: 0!important;}
  338. #header,#sidebar-right > div:last-child,#dle-content > div.blockbox > div.blockcontent > div:not(.upload-infos){display: none!important;}
  339. `)}