Jump to content
UBot Underground

replace text when scraping page


Recommended Posts

Hi

 

wondering if someone can be kind enough to help.

 

Im creating a yellow pages scraper - The issue that I am having is when scraping for the address - the addrss is comma seperated - This is making the details appear in the csv file as seperate peices of information -

 

What I want to do is add the address field in one cell or comma seperated - I cant get round this

 

any idea

 

thanks

Link to post
Share on other sites

As soon as you scrape it you can load it into a variable with the Set node and do an immediate $Replace searching for a "," or whatever and replace it with a Blank or another character. That is what I do right now.

Link to post
Share on other sites

Hi

 

wondering if someone can be kind enough to help.

 

Im creating a yellow pages scraper - The issue that I am having is when scraping for the address - the addrss is comma seperated - This is making the details appear in the csv file as seperate peices of information -

 

What I want to do is add the address field in one cell or comma seperated - I cant get round this

 

any idea

 

thanks

 

You need to put double quotes around each of the data elements e.g. "123 Main St, Any Town CA 90210"

Link to post
Share on other sites

Hi Buddy - Thanks alot for the reply - Im not entirely sure what you mean by sending it to a variable and then using the set command - I have attached a screenshot of the scrape - Just wondering if you could do a quick image example for me

 

thanks

 

abs

 

Sorry its not allowing me to attach the image so have uploaded it to my server

 

bigseotechniques.com/scrape-example.GIF

 

thanks

Link to post
Share on other sites

You need to put double quotes around each of the data elements e.g. "123 Main St, Any Town CA 90210"

 

Hi Brit - so for example after i have scraped the data I am adding it to a list called csv in the following way

 

{1},{2},{3},{4}

 

{1}is the name

{2} is the address

{3} is the zip

{4} is the tel

 

so would i add like this

 

{1},"{2}",{3},{4}

 

thanks

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...