I am working on a project to collect sports venue informations. There is one page (https://mksz.hu/versenyek/felnottNoiVersenyek/32022523/320218839) where you can find all the handball matches played after the leaders board in the schedule part. Each line represents a match. And in every line there are certain informations available. One of those information is the link to the video footage of the match. When I do a right click on the small tv icon (this represents the video link of the match) I can copy the address of the video.
When I inspect the small tv icon I cannot find within the Elements any link neither before the icon, nor after the icon.
I can only see this line:
Inspect on the small tv-icon
I would like to collect those links with all the other infos of the lines, but I cannot get the link to the video. Do you have any idea where to find the video link for each of the matches?
Since it appears in the left bottom of the page when I hover over the cursor, I thought imitating that could help, but did not succeed.
I am able to collect all the links from the page in the console with this command:
const results = [
['Url', 'Anchor Text', 'External']
];
var urls = document.getElementsByTagName('a');
for (urlIndex in urls) {
const url = urls[urlIndex]
const externalLink = url.host !== window.location.host
if(url.href && url.href.indexOf('://')!==-1) results.push([url.href, url.text, externalLink]) // url.rel
}
const csvContent = results.map((line)=>{
return line.map((cell)=>{
if(typeof(cell)==='boolean') return cell ? 'TRUE': 'FALSE'
if(!cell) return ''
let value = cell.replace(/[fnv]*ns*/g, "n").replace(/[tf ]+/g, ' ');
value = value.replace(/t/g, ' ').trim();
return `"${value}"`
}).join('t')
}).join("n");
console.log(csvContent)
But in that case I do not know which link belongs to which match.
Laszlo Liebscher is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.