> Twitch generates random class names, possibly to prevent your blocking some elements, so I tried to find the topmost classes.

I don't use Twitch, so I'm not sure what these rules are blocking, but if there's any bit of consistent text in the elements these are targeting, you can do something like

twitch.tv##div:has-text(Text To Block):xpath(../..)

There may be ways around this, ie here's the lengths Facebook go to write the word "Sponsored":

<a
aria-label="label"
class="oajrlxb2 g5ia77u1 qu0x051f esr5mh6w e9989ue4 r7d6kgcz rq0escxv nhd2j8a9 nc684nl6 p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso i1ao9s8h esuyzwwr f1sip0of lzcic4wl gmql0nx0 gpro0wi8 b1v8xokw"
href="/ads/about/?__cft__[0]=AZXrXEHuX_dD86iokjfchbSBrQ_82Tl3Un_9I6DwUiWYhK3t_v9M6fjRm2c2e3Ca45tcXk-oTF0IPtcCqR0T6NLHXlbRXN7QxfDwF_Xydka_MzBz8Y9MNk4b7FPb7qbFiALU6PjCE-RKXIbAwAU1uJXL3QLmPMUXDvIXi97x445-5WceUPJAKY7xekY5wDjA-TQacU37LvU3P5vATZyixPQBikeTOkPq_7EI410wzlGsoZlC1yMhE9L1lFuiwuWMK4VxsXB2zIvFjJqX0JjBHAP9ea1t9QmGKlff9cu1hO6crg&amp;__tn__=%2CP-R"
role="link"
tabindex="0"
>
<span>
<span class="j1lvzwm4 stjgntxs ni8dbmo4 q9uorilb gpro0wi8">
<b class="t5a262vz nc684nl6 ihxqhq3m l94mrbxd aenfhxwr l9j0dhe7 sdhka5h4">
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b class="nc684nl6 l94mrbxd l9j0dhe7 sdhka5h4">S</b>
<b
class="t5a262vz nc684nl6 ihxqhq3m l94mrbxd aenfhxwr l9j0dhe7 sdhka5h4"
>
p
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b class="myohyog2 l9j0dhe7 sdhka5h4">o</b>
<b class="b6zbclly l9j0dhe7 sdhka5h4">n</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b class="nc684nl6 l94mrbxd l9j0dhe7 sdhka5h4">s</b>
<b class="myohyog2 l9j0dhe7 sdhka5h4">o</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b class="t5a262vz l94mrbxd myohyog2 l9j0dhe7 sdhka5h4">r</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4">e</b>
<b class="ihxqhq3m myohyog2 l9j0dhe7 sdhka5h4">d</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
<b
class="l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4 ww7X6RO"
style="display: none"
>
-
</b>
</b>
</span>
</span>
</a>