Making a REALLY GOOD turk alert script

Discussion in 'Scripts' started by 2muchTurkin, Aug 28, 2012.

  1. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    OK. Here is the deal. I am scanning the web and trying to combine some scripts to make something that will search the first page of mturk every 1 second for whatever requesters you want. Any help is appreciated. I am NOT a coder but I do know simple html and JavaScript. Lets do this. Turkalert misses too many requesters and notifies us by email way too slow. I want something that audible notifies and works from your own personal PC and not running from a server or such. I will post the scripts I find and maybe something can be pieced together.
     
  2. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
  3. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    Credit to the author: Alan Koontz



    <script>
    <!-- Hide from old browsers

    /******************************************
    * Find In Page Script -- Submitted/revised by Alan Koontz (alankoontz@REMOVETHISyahoo.com)
    * Visit Dynamic Drive (http://www.dynamicdrive.com/) for full source code
    * This notice must stay intact for use
    ******************************************/

    // revised by Alan Koontz -- May 2003

    var TRange = null;
    var dupeRange = null;
    var TestRange = null;
    var win = null;


    // SELECTED BROWSER SNIFFER COMPONENTS DOCUMENTED AT
    // http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html

    var nom = navigator.appName.toLowerCase();
    var agt = navigator.userAgent.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);
    var is_ie = (agt.indexOf("msie") != -1);
    var is_ie4up = (is_ie && (is_major >= 4));
    var is_not_moz = (agt.indexOf('netscape')!=-1)
    var is_nav = (nom.indexOf('netscape')!=-1);
    var is_nav4 = (is_nav && (is_major == 4));
    var is_mac = (agt.indexOf("mac")!=-1);
    var is_gecko = (agt.indexOf('gecko') != -1);
    var is_opera = (agt.indexOf("opera") != -1);


    // GECKO REVISION

    var is_rev=0
    if (is_gecko) {
    temp = agt.split("rv:")
    is_rev = parseFloat(temp[1])
    }


    // USE THE FOLLOWING VARIABLE TO CONFIGURE FRAMES TO SEARCH
    // (SELF OR CHILD FRAME)

    // If you want to search another frame, change from "self" to
    // the name of the target frame:
    // e.g., var frametosearch = 'main'

    //var frametosearch = 'main';
    var frametosearch = self;


    function search(whichform, whichframe) {

    // TEST FOR IE5 FOR MAC (NO DOCUMENTATION)

    if (is_ie4up && is_mac) return;

    // TEST FOR NAV 6 (NO DOCUMENTATION)

    if (is_gecko && (is_rev <1)) return;

    // TEST FOR Opera (NO DOCUMENTATION)

    if (is_opera) return;

    // INITIALIZATIONS FOR FIND-IN-PAGE SEARCHES

    if(whichform.findthis.value!=null && whichform.findthis.value!='') {

    str = whichform.findthis.value;
    win = whichframe;
    var frameval=false;
    if(win!=self)
    {

    frameval=true; // this will enable Nav7 to search child frame
    win = parent.frames[whichframe];

    }


    }

    else return; // i.e., no search string was entered

    var strFound;

    // NAVIGATOR 4 SPECIFIC CODE

    if(is_nav4 && (is_minor < 5)) {

    strFound=win.find(str); // case insensitive, forward search by default

    // There are 3 arguments available:
    // searchString: type string and it's the item to be searched
    // caseSensitive: boolean -- is search case sensitive?
    // backwards: boolean --should we also search backwards?
    // strFound=win.find(str, false, false) is the explicit
    // version of the above
    // The Mac version of Nav4 has wrapAround, but
    // cannot be specified in JS


    }

    // NAVIGATOR 7 and Mozilla rev 1+ SPECIFIC CODE (WILL NOT WORK WITH NAVIGATOR 6)

    if (is_gecko && (is_rev >= 1)) {

    if(frameval!=false) win.focus(); // force search in specified child frame
    strFound=win.find(str, false, false, true, false, frameval, false);

    // The following statement enables reversion of focus
    // back to the search box after each search event
    // allowing the user to press the ENTER key instead
    // of clicking the search button to continue search.
    // Note: tends to be buggy in Mozilla as of 1.3.1
    // (see www.mozilla.org) so is excluded from users
    // of that browser.

    if (is_not_moz) whichform.findthis.focus();

    // There are 7 arguments available:
    // searchString: type string and it's the item to be searched
    // caseSensitive: boolean -- is search case sensitive?
    // backwards: boolean --should we also search backwards?
    // wrapAround: boolean -- should we wrap the search?
    // wholeWord: boolean: should we search only for whole words
    // searchInFrames: boolean -- should we search in frames?
    // showDialog: boolean -- should we show the Find Dialog?


    }

    if (is_ie4up) {

    // EXPLORER-SPECIFIC CODE revised 5/21/03

    if (TRange!=null) {

    TestRange=win.document.body.createTextRange();



    if (dupeRange.inRange(TestRange)) {

    TRange.collapse(false);
    strFound=TRange.findText(str);
    if (strFound) {
    //the following line added by Mike and Susan Keenan, 7 June 2003
    win.document.body.scrollTop = win.document.body.scrollTop + TRange.offsetTop;
    TRange.select();
    }


    }

    else {

    TRange=win.document.body.createTextRange();
    TRange.collapse(false);
    strFound=TRange.findText(str);
    if (strFound) {
    //the following line added by Mike and Susan Keenan, 7 June 2003
    win.document.body.scrollTop = TRange.offsetTop;
    TRange.select();
    }



    }
    }

    if (TRange==null || strFound==0) {
    TRange=win.document.body.createTextRange();
    dupeRange = TRange.duplicate();
    strFound=TRange.findText(str);
    if (strFound) {
    //the following line added by Mike and Susan Keenan, 7 June 2003
    win.document.body.scrollTop = TRange.offsetTop;
    TRange.select();
    }


    }

    }

    if (!strFound) alert ("String '"+str+"' not found!") // string not found


    }
    // -->
    </script>

    <!-- EXAMPLE FORM OF FIND-IN-PAGE SEARCH USING SUBMIT (ALLOWING 'ENTER/RETURN' KEY PRESS EVENT) -->
    <form name="form1" onSubmit="search(document.form1, frametosearch); return false"><input type="text" name="findthis" size="15" title="Press 'ALT s' after clicking submit to repeatedly search page"> <input type="submit" value="Find in Page" ACCESSKEY="s"></form>
     
  4. Athena

    Athena User

    Joined:
    Aug 8, 2012
    Messages:
    730
    Likes Received:
    0
    I am, like, totally code illiterate. My only suggestion is to ask the turkopticon creators for a recommendation, since I think we can be reasonably certain they'd not recommend someone sub-par in any way.
     
  5. Athena

    Athena User

    Joined:
    Aug 8, 2012
    Messages:
    730
    Likes Received:
    0
    And we need a better block requester script, too.
     
  6. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    I believe I can piece something together possibly. You can learn anything if you just Google it and read =]. No guarantees though but I will put as much time into it as I can. There is a lot of different scripts out there that do part of what we need. I will try my damnedest until somebody comes along with it =]
     
  7. Athena

    Athena User

    Joined:
    Aug 8, 2012
    Messages:
    730
    Likes Received:
    0
    Heh. I think that's sorta true, but only in a way.

    I'm like a idiot savant autodidact when it comes to super-technical microbiology. My curiosity drives my ability to learn all about that stuff. It's not boring to me at all.
    But I have almost NO ability to learn some stuff (and for some reason, anything and everything computer programming is one of those things.)

    You're good (or can become good) at what you like, I think, in a really basic way.

    JMO.
     
  8. Athena

    Athena User

    Joined:
    Aug 8, 2012
    Messages:
    730
    Likes Received:
    0
    But anyway, if you put something together, I'll send you 50 cents or $1 via Amazon payments to test it out and recommend or whatever. IDEALLY I'd say ringing my phone with a recognized number would be ideal/perfect. A google email notification would be acceptable.
    I will totally pay you.
    If you want to make it free at some later date after you feel like you've been adequately compensated? That's up to you. It's your intellectual property to do with as you please. :)
     
  9. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    Nah id never take money. If it ends up being something I have to run a server then I might have to take donations or something but that's a bit off from now. I am looking into the built in search function on chrome and seeing if I can get a script to refresh the mturk page then run the built in search function and if there is matches it will alert. Seems the easiest way to do it. Like I said I am not a coder but I know the basics so maybe I can learn a bit and get this working.
     
  10. Athena

    Athena User

    Joined:
    Aug 8, 2012
    Messages:
    730
    Likes Received:
    0
    I think if you devote time to building it and it works, you at least deserve something.
    Have you ever looked at how easy it is to send someone money via Amazon payments?
    It's, like, 5 seconds of effort.
    And there are a lot of surveys that pay $00.50 for three or so minutes of work. It could add up to make it worth your while. (the only reason I don't donate to turkopticon, etc is because they only take paypal. And I don't usually "do" paypal because it's kind of a pain in the butt.)
     
  11. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    looks like I can code it as a chrome extension. Gonna take me a bit to get everything worked out. I got to do some searching on how amazons server treats constant connections. Wonder if turkalert has a specific reason for only getting new hit results every 3 mins. Could be because the server blocks connections if they are too frequent? Just something else I need to look into. Anyone with knowledge on any of this please feel free to comment. Nite time for me though.
     
  12. Athena

    Athena User

    Joined:
    Aug 8, 2012
    Messages:
    730
    Likes Received:
    0
    Good night, and thank you, seriously!
     
  13. aswathy

    aswathy Banned

    Joined:
    Jun 14, 2012
    Messages:
    116
    Likes Received:
    0
    Can refresh the page every 3 sec.
     
  14. gingery

    gingery Member

    Joined:
    Aug 28, 2012
    Messages:
    17
    Likes Received:
    0
  15. bootybitch

    bootybitch Banned

    Joined:
    Jul 14, 2012
    Messages:
    514
    Likes Received:
    0
    Just an FYI, searching that often will get your account banned. There's a reason TA only searches every 3 mins, and it's because Amazon will think you're a bot. So, please make this script and pass it out to all the scammers. I'll stick with TA ;)
     
  16. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    I have a bit of it together and am currently searching on exactly what you just said BB. There is little to no information available and I have emailed Amazon dev on this issue and am waiting for an email back to define their exact perimeters they will allow. I am trying my best.
     
  17. bootybitch

    bootybitch Banned

    Joined:
    Jul 14, 2012
    Messages:
    514
    Likes Received:
    0
    I'm just busting your chops darling. But yes searching too quickly too often is a surefire way to get an account flagged. Have you ever been in a hurry accepting HITs and got a 5-minute timeout? I have. Same thing here, only too many timeouts = no more account. That's why TA says they can only search every 3 minutes. I haven't got a timeout for searching but like I said, I have got one for accepting too many HITs too fast so I believe it.
     
  18. ofnoaccount

    ofnoaccount New Member

    Joined:
    Jun 19, 2012
    Messages:
    4
    Likes Received:
    0
  19. bootybitch

    bootybitch Banned

    Joined:
    Jul 14, 2012
    Messages:
    514
    Likes Received:
    0
    I totally missed this earlier lol. Anyway good luck getting through to Amazon about anything that could possibly help us out. I appreciate you trying to improve on a good thing, but I think there's a reason it hasn't already been upgraded.
     
  20. 2muchTurkin

    Joined:
    Jul 19, 2012
    Messages:
    1,281
    Likes Received:
    0
    I am thinking the same. Would really like to get something that actually alerts for ALL of the requesters we want INSTANTLY. I have had TA not notify at all or take too long. I am not too lazy to keep refreshing myself but would really like to not have too. =] We shall see how it goes. Just something I am spending any extra time I have on. Technically I could have this running off a server IP spoofing so it LOOKS like it is not getting requests from the same server over and over every 10 seconds. Or have a few diff servers working together but that is gonna start costing a bit much. There are ways around it but I want to avoid causing myself or others any problems with amazon. Is not worth it if it causes problems.
     

Share This Page