Jump to content
UBot Underground

katelynnm

Members
  • Content Count

    23
  • Joined

  • Last visited

Posts posted by katelynnm

  1. I have a list of keywords and results.  I want to delete everything in the second column from the word "results" onward.  I can't seem to figure out how to select that portion of the strings since they are not always exactly the same.  Is there some sort of wildcard I can do or anything?

    Any help would be greatly appreciated!

     

    For reference, here's a screencap of the table:

     

    http://i42.tinypic.com/10e36ma.jpg

  2. I have a table with 50 rows (a screencap of part of it is below).  I have another csv file that states how many visits a writer averages on his/her posts.  Basically I need to set a variable called #rate that will correspond to the range that the person falls under.  For instance, if the person averages 200 visits per post, then #rate will equal $1.50.  I need it to loop through a csv of users to calculate each one and add them all to a new list.  I'm not sure how to go about it without manually setting each range as a separate if statement, and I feel like there must be a smarter and easier way than that.  Does anyone have any ideas?

     

    http://i39.tinypic.com/mj766x.jpg

  3. Hi!  I just tried it but it didn't work-here are the two ways I tried it:

     

    Attempt 1:

    set(#removecomma, $replace($next list item(%searchterms), ",", $nothing), "Global")
    type text(<id="search-home-input">, $next list item(%searchterms), "Standard")
    

    Attempt 2:

    type text(<id="search-home-input">, $next list item(%searchterms), "Standard")
    set(#removecomma, $replace("<id=search-home-input>", ",", $nothing), "Global")
    
  4. Within a loop, I'm using "$next list item" to type into an input box from a list.  This causes the item to have a comma at the end of it.  Example: "dog,"  How can I hit backspace to delete the comma before moving on with my script?  I have tried typing {BK} and {Backspace} into the "Text to Type" field following the "$next list item", but that doesn't work.

     

    For reference, I have pro version 4.

    Thanks.

  5. I have a bot that needs to scrape the seconds (#s), minutes (#m) or hours (#h) that is listed on the first 15 search results.  It just won't save the times properly at all-I can't get them separated into separate rows or do a replace to add in commas or anything.  I'm very stuck-what am I doing wrong?

     

    Here is my code:

    clear list(%search term)
    clear list(%times)
    navigate("https://twitter.com/search-home", "Wait")
    type text(<id="search-home-input">, "puppy", "Standard")
    click(<class="button btn primary-btn submit selected search-btn">, "Left Click", "No")
    wait for element(<title="Find the most recent tweets">, "", "Appear")
    click(<title="Find the most recent tweets">, "Left Click", "No")
    wait for element(<title="Find the most recent tweets">, "", "Appear")
    set(#time, $scrape attribute(<span,class="_timestamp js-short-timestamp js-relative-timestamp">, "innerhtml"), "Global")
    set(#seconds, $replace(%times, "s", "s, {$new line}"), "Global")
    set(#minutes, $replace(#time, "m", "m, {$new line}"), "Global")
    add item to list(%times, #time, "Don\'t Delete", "Global")
    save to file("C:\\Users\\Katelynn\\Desktop\\times.csv", %times)
    set(#term, $scrape attribute(<class="search-query">, "innertext"), "Global")
    loop(15) {
        add item to list(%search term, #term, "Don\'t Delete", "Global")
    }
    save to file("C:\\Users\\Katelynn\\Desktop\\search.txt", %search term)
    
    
    • Like 1
  6. I have a table with two columns.  I want to take the table and reverse the entire thing.

     

    Example:

     

    This original table:

    -------------------

    |  Dog  |     1    |

    -------------------

    |   Cat  |     2    |

    -------------------

    |  Bird  |      4   |

    -------------------

    |  Fish  |     8   |

    -------------------

     

    Becomes:

    -------------------

    |  Fish  |     8   |

    -------------------

    |  Bird  |      4   |

    -------------------

    |   Cat  |     2    |

    -------------------

    |  Dog  |     1    |

    -------------------

     

    How do I do that?

    I tried this which worked but I want it to be in Decending order with Column 1 as the index, not ascending.

    plugin command("TableCommands.dll""sort table"&positiveTable, 1)

     

  7. Thank you, everyone-I just figured it out  :)

    if($both($comparison(#globalrank, "<=", 50000), $comparison(#globalrank, ">", 40000))) {
            then {
                if($both($comparison(#googleresults, "<=", 30000), $comparison(#googleresults, ">", 25000))) {
                    then {
                        add item to list(%oklist, #final_row, "Delete", "Global")
                    }
                }
            }
        }
    
  8. Hi Steve-thank you for the help!  It looks like it is doing what I need it to do, but I'm having trouble changing the column.  I switched out the cell in the if statement, but it is still changing only the google results column.  Here is that change:

     

    if($comparison(#com"=""Yes")) {
            then {
                set(#color"lightgreen""Global")
            }
            else {
                set(#color"red""Global")
            }
        }

  9. I have an HTML table that is generated using ubot.

    Now I want the bot to go through a specific column in the table and, if a cell contains only the word "yes", change the background color of that cell to green.  Conversely, if the cell contains only the word "no", I want the cell background to change to red.

     

    Any ideas regarding how how to go about this would be greatly appreciated!  I have some coding experience (JavaScript, jQuery, jQuery mobile, PHP, etc.) but I'm very new to ubot.

     

    For reference, here is my current ubot code:

    clear table(&my table)
    clear list(%rows)
    clear list(%complete)
    create table from file("C:\\Users\\Katelynn\\Desktop\\market_research.csv", &my table)
    set(#count, 0, "Global")
    set(#header, "<!DOCTYPE html>
    <html>
    <head>
    <link href=\"stylesheets/styles.css\" rel=\"stylesheet\" />
    </head>
    <body>
    <table>", "Global")
    set(#footer, "</table>
    </body>
    </html>", "Global")
    loop($table total rows(&my table)) {
        set(#id, $table cell(&my table, #count, 0), "Global")
        set(#name, $table cell(&my table, #count, 1), "Global")
        set(#domain, $table cell(&my table, #count, 2), "Global")
        set(#regdate, $table cell(&my table, #count, 3), "Global")
        set(#title, $table cell(&my table, #count, 4), "Global")
        set(#brandname, $table cell(&my table, #count, 5), "Global")
        set(#com, "<id=\"com\">{$table cell(&my table, #count, 6)}</id>", "Global")
        set(#net, "<id=\"net\">{$table cell(&my table, #count, 7)}</id>", "Global")
        set(#org, "<a id=\"org\">{$table cell(&my table, #count, 8)}</id>", "Global")
        set(#biz, "<id=\"biz\">{$table cell(&my table, #count, 9)}</id>", "Global")
        set(#globalrank, $table cell(&my table, #count, 10), "Global")
        set(#topcountry, $table cell(&my table, #count, 11), "Global")
        set(#googleresults, $table cell(&my table, #count, 12), "Global")
        set(#link, $table cell(&my table, #count, 13), "Global")
        set(#final_row, "<tr><td>{#id}<td>{#name}<td>{#domain}<td>{#regdate}<td>{#title}<td>{#brandname}<td>{#com}<td>{#net}<td>{#org}<td>{#biz}<td>{#globalrank}<td>{#topcountry}<td>{#googleresults}<td><a href=\"{#link}\">Go!</a><tr>", "Global")
        add item to list(%rows, #final_row, "Delete", "Global")
        increment(#count)
    }
    save to file("C:\\Users\\Katelynn\\Desktop\\market_research_bot.php", %rows)
    add item to list(%complete, "{#header}{%rows}{#footer}", "Delete", "Global")
    save to file("C:\\wamp\\www\\index.php", %complete)
    
    

    Lastly, here is my current CSS:

    tr {background-color: #f7f7f7;}
    body {background-color:#8b9dc3;}
    td:first-child { 
            text-align: center;
            font-weight: bold;
            padding-left: 5px;
            padding-right: 5px;
    }
    
    td:nth-child(odd)
    {
    background-color: #FFFFFF;
    }
    
    tr:first-child {
            background-color: #FFFFFF !important;
            text-align: center;
            font-weight: bold;
            font-size: 110%;
            height: 50px;
    }
    
    td {
            padding-left: 5px;
            padding-right: 5px;
    
  10. How can I go through a column of a csv and delete all instances of a letter-even when it is part of a word?  For example, remove every instance of the letter "E"?

     

    Here is what I have tried:

    set table cell(&my table, #row_num, 2, $replace($table cell(&my table, #row_num, 2), "Â", $nothing))
        increment(#row_num)
    
  11. I'm creating a bot that goes through a list of URLs in one column, saves the fastest suggested route in google maps to the next column, and then saves a screenshot of the map to the third column.

     

    I'm having the hardest time trying to save an image to a table cell.  Is there any way to go about this?  Any help would be greatly appreciated!

     

    Here is my code:

    navigate("maps.google.com", "Wait")
    click(<id="d_launch">, "Left Click", "No")
    create table from file("C:\\Users\\Katelynn\\Desktop\\addresses.txt", &my table)
    set(#row_num, 0, "Global")
    clear list(%places)
    loop($table total rows(&my table)) {
        type text(<id="d_d">, "Current Location", "Standard")
        type text(<id="d_daddr">, $table cell(&my table, #row_num, 0), "Standard")
        click(<name="btnG">, "Left Click", "No")
        wait for browser event("Everything Loaded", "")
        set table cell(&my table, #row_num, 1, $scrape attribute($element offset(<class="dir-altroute-inner">, 0), "innertext"))
        change attribute(<id="d_d">, "value", $nothing)
        change attribute(<id="d_daddr">, "value", $nothing)
        increment(#row_num)
    }
    save to file("C:\\Users\\Katelynn\\Desktop\\googlemaps.csv", &my table)
    
    
  12. Thank you both.  HelloInsomnia: I just tried what you posted and it replaces every cell with numbers that increase by one all the way down.

     

    Here is the table that I'm trying to change:

     

    http://s12.postimg.org/ikzl0vci5/one.jpg

     

    I want it to go through the middle column and remove all instances of "m run".  Basically code that changes it to this:

     

    http://s22.postimg.org/d31p69sap/image.jpg

     

    Here is my ubot code thus far:

    create table from file("C:\\Users\\Katelynn\\Desktop\\data2.csv", &my table)
    set(#loop_row_num, 0, "Global")
    loop($table total rows(&my table)) {
        set table cell(&my table, #loop_row_num, 1, $replace($table cell(&my table, #loop_row_num, 0), "m run", "nothing"))
        increment(#loop_row_num)
    }
    save to file("C:\\Users\\Katelynn\\Desktop\\data3.csv", &my table)
    
    
  13. I'm trying to search a table and find all instances of a string within a specific column and replace them with nothing.  For instance: search Column 1 and replace all instances of the word "mile" with nothing, but keep everything else that is in the cell.  How would I go about doing that?  Thank you in advance.

×
×
  • Create New...