Nucleo Robot TprenD 2

TprenD likea todo canal Global - Autofollow y crapero también (v6)

当前为 2019-02-12 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Nucleo Robot TprenD 2
  3. // @namespace https://greasyfork.org/es/scripts/377368-nucleo-robot-tprend-2
  4. // @version 2.1
  5. // @description TprenD likea todo canal Global - Autofollow y crapero también (v6)
  6. // @author by @kchamat
  7. // @match https://classic.taringa.net/TprendMod*
  8. // @include https://classic.taringa.net/*
  9. // @exclude https://classic.taringa.net/*/siguiendo/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // ---- Para utilizarlo con otra cuenta debe cambiar la palabra TPRENDMOD por su Nick de Usuario y el numero de user_id por el id de su cuenta
  14. // ---- si desconoce el id de su cuenta ingrese en https://api.taringa.net/user/nick/view/SU_PROPIO_NICK
  15.  
  16. (function() {
  17. 'use strict';
  18. window.stop();
  19. var user_nick="TprendMod";
  20. var user_id="29024560";
  21. var segundos=3;
  22. // funcion redirigir a tal url en 10 segundos
  23. function redirigir_a_en(url,seg) {
  24. var a = document.createElement("a");
  25. a.href = url;
  26. setTimeout(function() {
  27. a.click();
  28. }, seg*1000);
  29. }
  30. ///función para abrir en una 2da pestaña e ir dando unfollow
  31. function abrirEnPestana(url) {
  32. var a = document.createElement("a");
  33. a.target = "_al_lado";
  34. a.href = url;
  35. a.click();
  36. }
  37.  
  38. //Likeando todo todo
  39. $.getJSON("https://api.taringa.net/shout/public/view", function(data) {
  40. $.each(data, function(i, item) {
  41. var id = item.id;
  42. var owner = item.owner.id;
  43. $.ajax({
  44. url: '/ajax/shout/vote',
  45. type: 'post',
  46. dataType: 'json',
  47. data: {
  48. owner: owner,
  49. uuid: id,
  50. score: 1
  51. },
  52. });
  53. });
  54. });
  55. // métodos de comportamiento cíclico
  56. var nro_page =Math.floor((Math.random() * 19));
  57. $('head').append('<meta http-equiv="refresh" content="'+segundos+'">' );
  58. var url='https://classic.taringa.net/'+user_nick;
  59. redirigir_a_en(url,segundos);
  60. var nedge='https://classic.taringa.net/'+user_nick+'/siguiendo/'+(nro_page);
  61. //abrirEnPestana(nedge);
  62.  
  63. //Seguir usuarios desde nro_page
  64. var urlapi="https://api.taringa.net/user/followers/view/"+user_id+"?trim_user=true&count=25&page="+nro_page;
  65. //alert(urlapi);
  66. $.getJSON("https://api.taringa.net/user/followers/view/"+user_id+"?trim_user=true&count=30&page="+nro_page, function(data) {
  67. $.each(data, function(nro_item2,user2) {
  68. var id = user2;
  69. notifica.ajax(Array("action=follow","type=user","obj=" + id),null,null,true,false);
  70. });
  71. });
  72. //Juega a los dados, si sale 1 crapea un shout si sale 2 lo reshoutea
  73. $.getJSON( "https://api.taringa.net/shout/random/view", function( data ) {
  74. var items = [];
  75. $.each( data, function( key, val ) {
  76. items.push( key + ":" + val + "<br>" );
  77. });
  78. var chance=Math.floor((Math.random() * 45) + 1);
  79. var tipo_shout=data.attachment.type;
  80. var owner_nick=data.owner.nick;
  81. var owner_id=data.owner.id;
  82. var id_shout=data.id;
  83. var texto=data.body;
  84. console.log(chance);
  85. console.log(tipo_shout);
  86. var seleccionador=chance+tipo_shout;
  87. var image_url=data.attachment.url;
  88. var contenido=" ";
  89. //Crapeo al azar
  90. if (seleccionador=='1image'){
  91. contenido=texto+"\n <════Se lo re crapié a @"+owner_nick+"════>";
  92. $.ajax({
  93. type : 'POST',
  94. dataType: 'json',
  95. url : '/ajax/shout/add',
  96. data : {
  97. key : global_data.user_key,
  98. body : contenido,
  99. privacy : 0,
  100. attachment_type : 1,
  101. attachment : image_url
  102. }
  103. });
  104. //new Audio('https://www.soundjay.com/button/sounds/button-44.mp3').play();
  105. }
  106. //Reshout al azar
  107. if (seleccionador=='2image'){
  108. $.ajax({
  109. url: '/ajax/shout/add',
  110. type: 'post',
  111. dataType: 'json',
  112. data: {
  113. key: global_data.user_key,
  114. parent_id: id_shout,
  115. parent_owner: owner_id
  116. },
  117. success: function(res) {
  118. callback(res);
  119. },
  120. error: function(xhr, status, error){
  121. callback(xhr);
  122. }
  123. });
  124. //new Audio('https://www.soundjay.com/button/sounds/button-44.mp3').play();
  125. }
  126. if (seleccionador=='3image'){
  127. $.ajax({
  128. url: '/ajax/shout/add',
  129. type: 'post',
  130. dataType: 'json',
  131. data: {
  132. key: global_data.user_key,
  133. parent_id: id_shout,
  134. parent_owner: owner_id
  135. },
  136. success: function(res) {
  137. callback(res);
  138. },
  139. error: function(xhr, status, error){
  140. callback(xhr);
  141. }
  142. });
  143. //new Audio('https://www.soundjay.com/button/sounds/button-44.mp3').play();
  144. }
  145. });
  146. })();