Jump to content
UBot Underground

Recommended Posts

I am trying to make a YellowPages scrape to capture the following information into a csv file.

  • Business Name
  • Address
  • Phone Number
  • website URL

 

 

Issue I am having:

Yellow Pages does not have all the information for each listing. When I scrape the page with Scrape Attribute, add item to List to List then save the table to a CSV file, everything gets out of line. The wrong address will be with the wrong business.

 

I tried to do an if then statement with a condition for <div class="rank pin">:

  • if <div class="rank pin"> then website, address, phone and business name to list "A"
  • Else if <div class="rank"> then website, address, phone and business name to list "B"

 

Yellow Pages has the information available (address, phone and business name) when <div class="rank pin">. I was trying to only capture the information if the <div class="rank pin"> is true. However, the if statement works for the entire page, not specific table space in the web page.

 

help would be greatly appreciated.

 

Thanks,

mike

post-6314-0-13369700-1353851652_thumb.png

Link to post
Share on other sites

Instead of scraping the page, you might want to click on each of the links and then scrape the information from their individual pages... I haven't looked but there is a good chance it is formatted in a more easily accessible format there...

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