Get URL and open it

With element attribute it easy to get url of following source code but it would be usefull also to able to open it. I need to get that URL and open it to get data from next page. That javascript window which pop ups open, I cannot get any data there.

<a title="Part Number" onclick="javascript:colorboxExtended.open(this.href, {width: '90%', height: '90%', title: '' }, 0); return false;" onfocus="this.blur();" href="domain.com/something/" class=""><nobr class="">19-300634</nobr></a>

If you have href link, why can't you folow it ?

There comes popup window front of a earlier page and I cannot get data there.

Go to website http://web1.carparts-cat.com/loginh.aspx?sid=018004
Then follow path-> Alfa Romeo -> STELVIO (949_) -> 2.2 D (949.AXC1A) and click part number 19-300634. I cannot get data from that popup window.

Then you can devide scraping process on 2 separate steps. Collecting links and following them...

Won't work either. That website is a litle bit odd. Link works maybe only 15mins and after that it directs to main page.

I will try to scrape some data for you from that page...

IFRAME opens right after a click.... So a current parent selector changes and scrape stops....

I had to use greasemonkey script with scraping. Greasemonkey script extracts URL out of this:
<a title="Part Number" onclick="javascript:colorboxExtended.open(this.href, {width: '90%', height: '90%', title: '' }, 0); return false;" onfocus="this.blur();" href="domain.com/something/" class=""><nobr class="">19-300634</nobr></a>
And writes new link which is
<a href="domain.com/something/>Part number</a>
Then it opens to new normal window and data can be reached.

no problems at all to scrape it:
image

sitemap just for example...

{"_id":"carparts-cat","startUrl":["https://web1.carparts-cat.com/default.aspx?34=0,100121&240=0&32=131999&230=29&1271=48&1272=0b1fb0c3-0be3-4f63-8c9e-92b08c2769e2&10=45F7326B8E6747D1BD3B544CD60A4449018004&14=4&12=130"],"selectors":[{"id":"parts","linkType":"linkFromHref","multiple":true,"parentSelectors":["_root"],"selector":".pnl_link_eartnr a[title]","type":"SelectorLink"},{"id":"desc","multiple":false,"parentSelectors":["parts"],"regex":"","selector":"tr.ad_artlist_row:contains('Parts Description') .ad_td_val span","type":"SelectorText"},{"id":"pack","multiple":false,"parentSelectors":["parts"],"regex":"","selector":"tr.ad_artlist_row:contains('Packing unit') .ad_td_val_alt span","type":"SelectorText"},{"id":"ean","multiple":false,"parentSelectors":["parts"],"regex":"","selector":".ad_ean_pnl span","type":"SelectorText"},{"id":"price","multiple":false,"parentSelectors":["parts"],"regex":"","selector":"span.\\.price_value_lbl","type":"SelectorText"}]}

I get just element count 0 all the time :frowning:

that's because you open each link as an iframe..... look into Edit Metadata, check URL I used

Your URL opens this kind of page


There it finds those part number links and opens them to popup window. I don't understand how you did that. I copied your sitemap.