How to Scrape a page opens in new tab

1,452 views
Skip to first unread message

KM

unread,
Aug 17, 2016, 9:06:46 AM8/17/16
to Web Scraper
Hi,

I am not able to get data from the link which opens in new tab. Below is my sitexml which i have created

{"startUrl":"https://www.amazon.in/s/ref=Mobile_Fingerprintsensor?_encoding=UTF8&hidden-keywords=B019Z8SGXU%20%7C%20B019Z8SGW6%20%7C%20B01E8D6GRK%20%7C%20B01DDP7V7S%20%7C%20B01DDP7DK8%20%7C%20B0158IT7ES%20%7C%20B0158ITDNI%20%7C%20B01BNGGHKQ%20%7C%20B01BSJLD84%20%7C%20B01DDP7DBC%7C%20B01DDP838O%20%7C%20B01DDP7GZK%20%7C%20B01DDP85BY%20%7C%20B01DDP87N0%20%7C%20B01DDP85KU%20%7C%20B01DDP7UQ0%20%7C%20B011RG8SOU%20%7C%20B011L80VQW%20%7C%20B01ABYRKTI%20%7C%20B01ABYRNLI%7C%20B01ABYRPZ2%20%7C%20B01GQ1U4HU%20%7C%20B01GQ1U4SY%20%7C%20B01GQ1U90W%20%7C%20B01GQ1U902%20%7C%20B01AUIUWWC%20%7C%20B01AUIUXHG%7C%20B0179SMA4O%20%7C%20B0179SMGN4%20%7C%20B0179SMJIG%20%7C%20B01ABYZS6K%20%7C%20B0179SM1L6%20%7C%20B01A11D2U2%20%7C%20B01BHUN4S6%20%7C%20B01AY3H9QA%20%7C%20B01DDP7US8%20%7C%20B01DDP7VC8%20%7C%20B01DDP7Q8C%20%7C%20B01DDP7P4M%20%7C%20B01DDP7YDE%20%7C%20B01DXTT6FE%20%7C%20B01DXTT064%20%7C%20B01DXTT05A%20%7C%20B01DXTSZRO%20%7C%20B01DXTSZHO%20%7C%20B01DXTSZGA%20%7C%20B01DXTSZDI%20%7C%20B01DXTSZ4C%20%7C%20B016QBVA5U%20%7C%20B016QBV730%20%7C%20B016QBV406%20%7C%20B016QBV12M%20%7C%20B016QBUXRQ%20%7C%20B016QBUUO2%20%7C%20B016QBUQSC%20%7C%20B016QBUN8K%20%7C%20B016QBUKCE%20%7C%20B016QBUH2C%20%7C%20B016QBUECK%20%7C%20B016QBUBCS%20%7C%20B016QBU8I0%20%7C%20B016QBU4S4%20%7C%20B016QBU1R8%20%7C%20B016QBTYIK%20%7C%20B016QBTV2Y%20%7C%20B016QBTRDC%20%7C%20B016QBTNUY%20%7C%20B016QBTJWQ%20%7C%20B016QBTFZC%20%7C%20B016QBTCMS%20%7C%20B016QBT87W%20%7C%20B016QBSXRS%20%7C%20B00O4WV5KY%20%7C%20B00O4WV2FW%20%7C%20B00O4WUYPG%20%7C%20B00O4WUVK4&rh=i%3Aelectronics&pf_rd_m=A1VBAL9TL5WCBF&pf_rd_s=desktop-1&pf_rd_r=EGFB7DW24YNMYKCZ1K3V&pf_rd_t=36701&pf_rd_p=f3cefc38-13ad-477e-8054-d65c6612e592&pf_rd_i=desktop","selectors":[{"parentSelectors":["_root"],"type":"SelectorElementClick","multiple":true,"id":"parent","selector":"a.a-link-normal h2.a-size-base","delay":"","clickElementSelector":"a.a-link-normal h2.a-size-base","clickElementUniquenessType":"uniqueHTMLText","clickType":"clickMore","discardInitialElements":false},{"parentSelectors":["parent"],"type":"SelectorText","multiple":false,"id":"title","selector":"h1.a-size-large span.a-size-large","regex":"","delay":""},{"parentSelectors":["parent"],"type":"SelectorText","multiple":false,"id":"pricetxt","selector":"td.a-span12 span.a-size-medium","regex":"","delay":""}],"_id":"mobile"}

can you please help me to achieve this.

Regards,

Mārtiņš Balodis

unread,
Aug 18, 2016, 3:21:20 AM8/18/16
to KM, Web Scraper
Hi,
Instead of using element click selector you should have used link selector. 

{"selectors":[{"parentSelectors":["_root"],"type":"SelectorLink","multiple":true,"id":"parent","selector":"a.a-link-normal.s-access-detail-page","delay":""},{"parentSelectors":["parent"],"type":"SelectorText","multiple":false,"id":"title","selector":"h1.a-size-large span.a-size-large","regex":"","delay":""},{"parentSelectors":["parent"],"type":"SelectorText","multiple":false,"id":"pricetxt","selector":"td.a-span12 span.a-size-medium","regex":"","delay":""}],"startUrl":"https://www.amazon.in/s/ref=Mobile_Fingerprintsensor?_encoding=UTF8&hidden-keywords=B019Z8SGXU%20%7C%20B019Z8SGW6%20%7C%20B01E8D6GRK%20%7C%20B01DDP7V7S%20%7C%20B01DDP7DK8%20%7C%20B0158IT7ES%20%7C%20B0158ITDNI%20%7C%20B01BNGGHKQ%20%7C%20B01BSJLD84%20%7C%20B01DDP7DBC%7C%20B01DDP838O%20%7C%20B01DDP7GZK%20%7C%20B01DDP85BY%20%7C%20B01DDP87N0%20%7C%20B01DDP85KU%20%7C%20B01DDP7UQ0%20%7C%20B011RG8SOU%20%7C%20B011L80VQW%20%7C%20B01ABYRKTI%20%7C%20B01ABYRNLI%7C%20B01ABYRPZ2%20%7C%20B01GQ1U4HU%20%7C%20B01GQ1U4SY%20%7C%20B01GQ1U90W%20%7C%20B01GQ1U902%20%7C%20B01AUIUWWC%20%7C%20B01AUIUXHG%7C%20B0179SMA4O%20%7C%20B0179SMGN4%20%7C%20B0179SMJIG%20%7C%20B01ABYZS6K%20%7C%20B0179SM1L6%20%7C%20B01A11D2U2%20%7C%20B01BHUN4S6%20%7C%20B01AY3H9QA%20%7C%20B01DDP7US8%20%7C%20B01DDP7VC8%20%7C%20B01DDP7Q8C%20%7C%20B01DDP7P4M%20%7C%20B01DDP7YDE%20%7C%20B01DXTT6FE%20%7C%20B01DXTT064%20%7C%20B01DXTT05A%20%7C%20B01DXTSZRO%20%7C%20B01DXTSZHO%20%7C%20B01DXTSZGA%20%7C%20B01DXTSZDI%20%7C%20B01DXTSZ4C%20%7C%20B016QBVA5U%20%7C%20B016QBV730%20%7C%20B016QBV406%20%7C%20B016QBV12M%20%7C%20B016QBUXRQ%20%7C%20B016QBUUO2%20%7C%20B016QBUQSC%20%7C%20B016QBUN8K%20%7C%20B016QBUKCE%20%7C%20B016QBUH2C%20%7C%20B016QBUECK%20%7C%20B016QBUBCS%20%7C%20B016QBU8I0%20%7C%20B016QBU4S4%20%7C%20B016QBU1R8%20%7C%20B016QBTYIK%20%7C%20B016QBTV2Y%20%7C%20B016QBTRDC%20%7C%20B016QBTNUY%20%7C%20B016QBTJWQ%20%7C%20B016QBTFZC%20%7C%20B016QBTCMS%20%7C%20B016QBT87W%20%7C%20B016QBSXRS%20%7C%20B00O4WV5KY%20%7C%20B00O4WV2FW%20%7C%20B00O4WUYPG%20%7C%20B00O4WUVK4&rh=i%3Aelectronics&pf_rd_m=A1VBAL9TL5WCBF&pf_rd_s=desktop-1&pf_rd_r=EGFB7DW24YNMYKCZ1K3V&pf_rd_t=36701&pf_rd_p=f3cefc38-13ad-477e-8054-d65c6612e592&pf_rd_i=desktop","_id":"mobile"}

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

KM

unread,
Aug 19, 2016, 6:10:11 AM8/19/16
to Web Scraper, karti...@gmail.com
Thank you.

It worked like charm.

To unsubscribe from this group and stop receiving emails from it, send an email to web-scraper...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages