Jump to content
UBot Underground

Varo

Fellow UBotter
  • Content Count

    111
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Varo

  1. Try these code

    set(#scraped string,"17 board • 2.1k followers
    17 board • 521 followers
    17 board • 1k followers
    17 board • 781 followers","Global")
    set(#result,$replace regular expression($replace regular expression($replace($find regular expression(#scraped string,"\\d+(\\.)?(\\d+)?k?(?=\\s*followers)"),".",","),"(?<=,\\d)k",00),"k",",000"),"Global")
    alert(#result)
    
    • Like 1
  2.  

    A slightly better way... I am trying to account for any number of followers.. 0,10,200,245 ,2.5k etc

    set(#scraped string,"17 board • 2.1k followers","Global")
    
    set(#result,$replace($replace($find regular expression(#scraped string,"\\d+(\\.\\d+k)?(?= followers)"),".",","),"k",00),"Global")
    
    

    I am also assuming that there is a single space after 'followers'.

     

    Code can be made more robust by allowing zero or more spaces after followers.

    set(#scraped string,"17 board •22.7k   followers","Global")
    set(#result,$replace($replace($find regular expression(#scraped string,"\\d+(\\.\\d+k)?(?=\\s*followers)"),".",","),"k",00),"Global")
    
    

    Thanks Sanjeev, i learn some lesson in your regex

  3. Thanks. Where is the pagination in your code? I guess that I will have to modify something in there to simulate the scroll?

    When you sent first GET request, then server will response with JSON data which contain parameter value, that you need to input as parameter url in the next request

  4. You are welcome Yagami.

     

    Http post is simple, just sent http get request to pinterest like this :

    https://www.pinterest.ca/resource/UserFollowersResource/get/?source_url=/infographicnowcom/followers/&data={"options":{"hide_find_friends_rep":true,"username":"infographicnowcom"},"context":{},"module":{}}&module_path=App(module=[object Object])&_=1510802889379
    
    https://www.pinterest.ca/resource/UserFollowersResource/get/?source_url=/infographicnowcom/followers/&data={"options":{"bookmarks":["Pz9Nakl5TXpvM09ERXdPVFV4TWpFNU5UWTBNREkxTXpvNU1qSXpNemN5TURNMk9EVTBOemMxT0RBM1gwVT18NDk5NGEyMDg4MzIyNjJlZGYwMjU0ZTUwZTI4OGYwZjk0MTg0M2YwMmY1YjdlZDg2MGU0MWIzNWZkM2QwYTAzOQ=="],"hide_find_friends_rep":true,"username":"infographicnowcom"},"context":{},"module":{}}&module_path=App(module=[object Object])&_=1510802889380
    

    and read the response with JSON parser

  5. you must put add list to list command inside page scroll loop

    clear list(%searchlistfollowers)
    add list to list(%searchlist,$list from text("/infographicnowcom
    /romper.com","
    "),"Delete","Global")
    loop($list total(%searchlist)) {
        navigate("https://www.pinterest.ca{$next list item(%searchlist)}","Wait")
        wait for browser event("Everything Loaded","")
        click(<innertext="Followers">,"Left Click","No")
        wait for browser event("Everything Loaded","")
        loop(20) {
            run javascript("window.scrollTo(0,document.body.scrollHeight); 
    ")
            wait for browser event("Page Loaded","")
            wait(1)
            add list to list(%searchlistfollowers,$scrape attribute(<(tagname="a" AND href=r"^/.*?/$")>,"href"),"Delete","Global")
        }
        wait(3)
    }
    
    
  6. It works when you search for profils "search -> People", but once you've clicked on a profile and clicked on "followers" to see the number of followers of that profile the code will not work. 

    The code work. Thats why i need you to post your code here,

    So we can discuss where is the problem

  7. Thank you for the answer, but what you are trying to do with your code won't work on Pinterest because expect the 10 first profils, the data is passed through the header and you can't find it in the html source code. 

    Have you try it ?

     

    Those code work on pinterest, and the data is not passed through the header. The data is JSON format and in the html source code.

    You can scrape using browser (html) or you can scrape using http get methods (json).

  8. i am using Chrome 49 and default User Agent.

    Everything is fine. Login succeed.

    navigate("https://www.hatena.ne.jp/login?location=http%3A%2F%2Fh.hatena.ne.jp%2F","Wait")
    wait for browser event("Everything Loaded","")
    type text(<full name field>,"testerUBOT","Standard")
    wait(1)
    type text(<password field>,"ubotter1","Standard")
    wait(1)
    click($element offset(<login button>,0),"Left Click","No")
    
    
    • Like 2
  9. Bought the bot works well, I do have one strange error not sure if this is down to Ubot or SSUB but I get a small gap at the top of the UI below window frame, Its fine on the bottom edge

     

    As my UI background is black it stands out and ruins the look of the bot is there anyway to fix this?

     

    see below image http://i66.tinypic.com/13ym2k7.png

     

    its because ubot. Try downgrade your ubot to 5.9.33 and those gap are gone

×
×
  • Create New...