Dynamically create href link for the link selector to visit profile site

I have a list of profile-entries where some entries have a different html-structure. On most of the profiles I can use link-selector as it is. On some other there is no "a" tag, but a "div" with a data-realid attribute with the neccessary id. I can scrape this with the element attribute selector. The url is then build with https://www.gelbeseiten.de/gsbiz/[the-scraped-data-realid].

How can I generate this url and let it be scraped as if it was one "a" tag url which the link selector will visit?

Url: https://www.gelbeseiten.de/Suche/Malerbetriebe/Coburg
The first entry (Malerwerkstätte Lützelberger GmbH) is an example where I can not use the link selector to scrape the profile page.
https://www.gelbeseiten.de/gsbiz/0d518fb3-2823-4773-b621-094a5b0d02f0

Can anybody help?

This cannot be done in a single scrape.

You can scrape all of attributes data-realid that contains part of the URL. Once you have done that, use regexr.com to create the full URLs by adding https://www.gelbeseiten.de/gsbiz to the scraped id.

Once you have done this, you can use these URLs as start URLs for your sitemap.