I'm trying to scrape for torrent information including the magnet link. However, depending on individual page it might end up in a different list element. Sometimes there are multiple magnet links, when I only need one. What kind of selector do i need in order to detect the first magnet link in the list but ignore any others if one is found? Is that even possible?
The problem with just using the element select is that sometimes, that same element is instead linking to an external page. It depends what page of the target website I'm at.
Url: 35MM v1.1 - FitGirl Repacks
for example, here it's in the bottom list element
Url: Ace Combat 7: Skies Unknown - Deluxe Edition - v1.8.2.8 + All DLCs + Multiplayer (Monkey Repack) - FitGirl Repacks
this page has it near the top
Update: I think I'm getting closer to what I want with a[href^='magnet']:first
. If I do element preview, it selects the magnet text for the link, but doesn't extract the link itself if I do data preview. Does it have to do with my selector type?
Sitemap:
{"_id":"Fitgirl","startUrl":["https://fitgirl-repacks.site/all-my-repacks-a-z/"],"selectors":[{"id":"paginator","paginationType":"clickMore","parentSelectors":["_root","paginator"],"selector":"a.lcp_nextlink","type":"SelectorPagination"},{"id":"Listing","linkType":"linkFromHref","multiple":true,"parentSelectors":["paginator"],"selector":".lcp_catlist a","type":"SelectorLink"},{"id":"Title","multiple":false,"parentSelectors":["Listing"],"regex":"","selector":"h1.entry-title","type":"SelectorText"},{"id":"Release Date","multiple":false,"parentSelectors":["Listing"],"regex":"","selector":"time","type":"SelectorText"},{"id":"Magnet","linkType":"linkFromHref","multiple":false,"parentSelectors":["Listing"],"selector":"thepartimnotsureabout","type":"SelectorLink"},{"id":"Original Size","multiple":false,"parentSelectors":["Listing"],"regex":"","selector":"strong:nth-of-type(4)","type":"SelectorText"},{"id":"Repack Size","multiple":false,"parentSelectors":["Listing"],"regex":"","selector":"strong:nth-of-type(5)","type":"SelectorText"}]}