Jump to content
UBot Underground

Recommended Posts

Guys this is my issue in Ubot when scraping something i noticed that when you scrape addresses lets say one address is

 

St. 34, Alesandra Avenue 

 

Scraping is fine and It will fill one column in Excel and i am ok with that but

What about long strings lets say address is

 

Street 34.Allesandra Avenue New York Department,Ministry of defense,local directory......bla,bla,bla  

 

In these cases Ubot automatically goes into new line and ruins my data my question is this:

 

Is there a way to Limit how many informations Script scrapes from a particular string?

Is there a way to force Ubot to keep everything in 1 line regardless of the amount of data in one string?

 

So my goal is this

Regardless if the Address is Looong or Short Ubot MUST keep everything in one single line until variable increments the line!

 

I am working on a new thing and this is my issue if anyone can help please do! 

 

 

 

Link to post
Share on other sites
 
Scraping Code is simple but see attached in my debugger you can see line breaks even though i trim trailing spaces and still this happens in my excel (See attached pictures)
 
That is my issue there are line breaks and i cant fix it!
 

wait for browser event("Everything Loaded",3)

        set table cell(&Scraped,#row,0,$trim($scrape attribute(<itemprop="name">,"innertext")))
        set(#adresa,$replace($trim($scrape attribute(<itemprop="address">,"innertext"))," - View Map",""),"Global")
        set table cell(&Scraped,#row,1,#adresa)
        set(#phone,$trim($scrape attribute(<rel="mainPhone">,"innertext")),"Global")
        set(#phone,$replace(#phone,"Phone:",""),"Global")
        set table cell(&Scraped,#row,2,#phone)
        set table cell(&Scraped,#row,3,$trim($scrape attribute(<rel="businessCategories">,"innertext")))
        set table cell(& Scraped,#row,4,$trim($scrape attribute(<itemprop="foundingDate">,"innertext")))
        set table cell(&Scraped,#row,5,$trim($scrape attribute(<rel="numEmployees">,"innertext")))
        set(#email,$trim($scrape attribute(<itemprop="email">,"innertext")),"Global")
        set(#email,$replace(#email,"Email:",""),"Global")
        set table cell(&Scraped,#row,6,#email)
        set table cell(&Scraped,#row,7,$trim($scrape attribute(<itemprop="faxNumber">,"innertext")))
        set table cell(&Scraped,#row,8,$trim($scrape attribute(<rel="annualRevenue">,"innertext")))
        set table cell(&Scraped,#row,9,$trim($scrape attribute(<rel="locationType">,"innertext")))
        set table cell(&Scraped,#row,10,$trim($scrape attribute(<rel="sicDetails">,"innertext")))
        set table cell(&Scraped,#row,11,$trim($scrape attribute(<rel="naicsDetails">,"innertext")))
        set table cell(&Scraped,#row,12,$trim($scrape attribute(<outerhtml=w"<span class=\"text-primary\" itemprop=\"name\">*</span>">,"innertext")))
        run javascript("location.reload(true);")
        wait(0.5)
        save to file("{$special folder("Desktop")}\\details.csv",&Scraped)
        increment(#row)

 

 

post-18544-0-28249800-1421781107_thumb.jpg

post-18544-0-78253800-1421781109_thumb.jpg

Link to post
Share on other sites

Ok another question this code worked i adapted it now i have another problem sometimes when scraping e-mails there are more than one mail and then they append together like this

 

In Normal site this is now mails are shown

 

ghta@gmx.com

konj@gmail.com

haroo@yahoo.com

 

 

Now when i scrape it they look like this

 

ghta@gmx.comkonj@gmail.comharoo@yahoo.com

 

So How do i Put Spaces just to space these E-mails or put them in a row without breaking Lines in Excel?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...