Using GNU datamash to prefix the original data with the basename (filename at the end) from each URL, and then to group the data by the added column and extract the first URL from each group. The added field is then removed with cut at the end of the pipeline. This is reminiscent of how one might do a Schwartzian transform.
$ datamash basename 1 cut 1 <file | datamash groupby 1 first 2 | cut -f 2
https://www.domain.com/files/G5SPNDOF/AAA-1080p.mp4.html
https://www.domain.com/files/SVSRS0AD/BBB-1080p.mp4.html
You can instead get the last URL from each group:
$ datamash basename 1 cut 1 <file | datamash -s groupby 1 last 2 | cut -f 2
https://www.domain.com/files/ZQWL80BG/AAA-1080p.mp4.html
https://www.domain.com/files/UCIONEMA/BBB-1080p.mp4.html
... or a random one:
$ datamash basename 1 cut 1 <file | datamash -s groupby 1 rand 2 | cut -f 2
https://www.domain2.com/dl/G5SPNDOF/JHCGTS/AAA-1080p.mp4.html
https://www.domain.com/files/SVSRS0AD/BBB-1080p.mp4.html
$ datamash basename 1 cut 1 <file | datamash -s groupby 1 rand 2 | cut -f 2
https://www.domain.com/files/G5SPNDOF/AAA-1080p.mp4.html
https://www.domain.com/files/SVSRS0AD/BBB-1080p.mp4.html
$ datamash basename 1 cut 1 <file | datamash -s groupby 1 rand 2 | cut -f 2
https://www.domain.com/files/ZQWL80BG/AAA-1080p.mp4.html
https://www.domain.com/files/UCIONEMA/BBB-1080p.mp4.html
https://www.domain2.com/dl/G5SPNDOF/JHCGTS/AAA-1080p.mp4.htmlandhttps://www.domain.com/files/UCIONEMA/BBB-1080p.mp4.html?