Abs* 12 Posted June 18, 2010 Report Share Posted June 18, 2010 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 Quote Link to post Share on other sites
UBotBuddy 331 Posted June 18, 2010 Report Share Posted June 18, 2010 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. Quote Link to post Share on other sites
The_Brit 13 Posted June 18, 2010 Report Share Posted June 18, 2010 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" Quote Link to post Share on other sites
Abs* 12 Posted June 18, 2010 Author Report Share Posted June 18, 2010 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 Quote Link to post Share on other sites
Abs* 12 Posted June 18, 2010 Author Report Share Posted June 18, 2010 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 Quote Link to post Share on other sites
Abs* 12 Posted June 18, 2010 Author Report Share Posted June 18, 2010 Excellent the above fix worked great thanks Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.