Re: Parent Element Not Found

3,267 views
Skip to first unread message

Mārtiņš Balodis

unread,
Nov 6, 2014, 10:16:43 AM11/6/14
to Steve Berry, web-s...@googlegroups.com
Hi,
The "parent element not found" is shown when you are adding a child selector to an element selector and there are no elements that the element selector could select. Try doing an element preview for element selector if you see this error. Although I didn't have any problems selecting elements in this page with your sitemap. 

In the second email you gave a link that cannot be reached by the sitemap you gave. Maybe you didn't add a link selector that makes the selector go to the given page?

Here is my sitemap:

{"selectors":[{"parentSelectors":["_root"],"type":"SelectorElement","multiple":true,"id":"listing_sponsored","selector":"div.normalListings div:nth-of-type(n+5) div.level20","delay":""},{"parentSelectors":["_root"],"type":"SelectorElement","multiple":true,"id":"listing_normal","selector":"div.sortitem.businessbox","delay":""},{"parentSelectors":["listing_sponsored"],"type":"SelectorText","multiple":false,"id":"business-name","selector":"a.titleLink","regex":"","delay":""},{"parentSelectors":["listing_sponsored"],"type":"SelectorText","multiple":false,"id":"phone","selector":"div.floatLeft div.floatLeft span","regex":"","delay":""},{"parentSelectors":["listing_sponsored"],"type":"SelectorText","multiple":false,"id":"address","selector":"div.sponsor_info > div:nth-of-type(1) div","regex":"","delay":""},{"parentSelectors":["listing_normal"],"type":"SelectorText","multiple":false,"id":"business-name-normal","selector":"div.rdetails>a:nth-of-type(1)","regex":"","delay":""},{"parentSelectors":["listing_normal"],"type":"SelectorText","multiple":false,"id":"address-normal","selector":"div.rdetails > div:nth-of-type(1)","regex":"","delay":""},{"parentSelectors":["listing_normal"],"type":"SelectorText","multiple":false,"id":"phone-normal","selector":"div.floatLeft span","regex":"","delay":""}],"startUrl":"http://www.bbb.org/denver/accredited-business-directory/attorneys-personal-injury-and-property-damage","_id":"denver-bbb2"}

On Wed, Nov 5, 2014 at 9:03 PM, Steve Berry <sjber...@gmail.com> wrote:
Sorry, here is a sample page that I'm trying to grab the data from:



On Wednesday, November 5, 2014 11:59:39 AM UTC-7, Steve Berry wrote:
Hello,
I am trying to grab information from this page, and it won;t let me create selectors for the elements I need: giving me the message "parent element not found".  I can't figure out what's going on.

The info I need to grab is: Business name, phone number, address, email and website.

Here is what I have so far.  Any thoughts?  Any help would be very much appreciated.

{"startUrl":"http://www.bbb.org/denver/accredited-business-directory/attorneys-personal-injury-and-property-damage","selectors":[{"parentSelectors":["_root"],"type":"SelectorElement","multiple":true,"id":"listing_sponsored","selector":"div.normalListings div:nth-of-type(n+5) div.level20","delay":""},{"parentSelectors":["_root"],"type":"SelectorElement","multiple":true,"id":"listing_normal","selector":"div.sortitem.businessbox","delay":""}],"_id":"denver-bbb2"}



Steve

--
You received this message because you are subscribed to the Google Groups "Web Scraper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-scraper...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Berry

unread,
Nov 6, 2014, 2:53:26 PM11/6/14
to web-s...@googlegroups.com, sjber...@gmail.com
Thanks very much for your reply.  I did figure it out, and tried to delete the message so as not to waste anyones time, but apparently that didn't work.

Thanks again.

Robert Schoen

unread,
May 5, 2015, 12:49:07 PM5/5/15
to web-s...@googlegroups.com, sjber...@gmail.com
Steve: 

Could you explain how you overcame this issue? 

Thanks
Bob 
Reply all
Reply to author
Forward
0 new messages