Links not working, "null"

Web Scraper version: 0.5.4
Chrome version: 92.0.4515.107
OS: macOS Catalina 10.15.5

Hi, I am trying to retrieve footballer stats from transfermarket. I want to click on a player, then click on 'view full stats' under 'career' stats (lower down the page), to then scrape information.

even better IF , from the player page, the 'Stats' drop down -> and click stats by competition -> scrape data from the tables.

Sitemap:

{"_id":"market","startUrl":["https://www.transfermarkt.co.uk/spieler-statistik/wertvollstespieler/marktwertetop"],"selectors":[{"id":"players","type":"SelectorLink","parentSelectors":["_root"],"selector":".hauptlink a","multiple":true,"delay":0},{"id":"full_stats","type":"SelectorLink","parentSelectors":["players"],"selector":"a#\\33 42229[title]","multiple":false,"delay":0},{"id":"appearences","type":"SelectorText","parentSelectors":["full_stats"],"selector":"tr.odd:nth-of-type(1) td:nth-of-type(3)","multiple":false,"regex":"","delay":0}]}

Error Message:

The links dont appear to be working, i just get "null" when trying to scrape! 

![image|689x71](upload://uYqXWuKrWZliFC9N03CjRESrexB.png) 

Error: Could not retrieve target port
    at o.handleMessageResponse (content_script.js:4324)
    at o.receive (content_script.js:4309)

Thanks in advance :slight_smile:

@mreaton

Hello, the problem appears because the current selector 'full_stats' is only valid for Kylian Mbappe page.

For example, if I go to the Erling Haaland page - it returns 0.

Therefore, you have to use something more stable which would apply to every player page.

For example - div.c2action-footer a:contains("View full stats")

Sitemap example:

{"_id":"market","startUrl":["https://www.transfermarkt.co.uk/spieler-statistik/wertvollstespieler/marktwertetop"],"selectors":[{"delay":0,"id":"players","multiple":true,"parentSelectors":["_root"],"selector":".hauptlink a","type":"SelectorLink"},{"delay":0,"id":"full_stats","multiple":false,"parentSelectors":["players"],"selector":"div.c2action-footer a:contains(\"View full stats\")","type":"SelectorLink"},{"delay":0,"id":"appearences","multiple":false,"parentSelectors":["full_stats"],"regex":"","selector":"tr.odd:nth-of-type(1) td:nth-of-type(3)","type":"SelectorText"}]}

Hope it helps!

Sir, I must first say thank you! you are a genius. But i realised that what i really want is this page: Kylian Mbappé - Stats by competition (Detailed view) | Transfermarkt

most valuable players page -> go through every player -> stats(drop-down) -> select 'stats by competition' -> click 'detailed view'

This is the sitemap (doesnt work):
{"_id":"footballers","startUrl":["[https://www.transfermarkt.co.uk/spieler-statistik/wertvollstespieler/marktwertetop"],"selectors":{"id":"player","type":"SelectorLink","parentSelectors":["pages"],"selector":".hauptlink a","multiple":true,"delay":0},{"id":"pages","type":"SelectorLink","parentSelectors":["_root"],"selector":"li.page:nth-of-type(n+3) a","multiple":true,"delay":0},{"id":"stats_comp","type":"SelectorLink","parentSelectors":["player"],"selector":"#stats div:nth-of-type(2) li:nth-of-type(1) a","multiple":false,"delay":0},{"id":"detailed","type":"SelectorLink","parentSelectors":["stats_comp"],"selector":".footer a","multiple":false,"delay":0},{"id":"goals","type":"SelectorText","parentSelectors":["detailed"],"selector":"#yw1 tr.odd:nth-of-type(1) td:nth-of-type(6)","multiple":false,"regex":"","delay":0},{"id":"assist","type":"SelectorText","parentSelectors":["detailed"],"selector":"#yw1 tr.odd:nth-of-type(1) td:nth-of-type(7)","multiple":false,"regex":"","delay":0}]}

would be grateful for some help !
A million thankyou's !