I don't think this sentence is correct. Am I right?
I finally watched the video YouTube has been recommending for weeks.
Shouldn't the past perfect continuous be used there instead of the present perfect continuous?
If YouTube is still recommending the video, than "has been recommending" is correct. There is a continuous process of "recommending" that began in the past and continues to the present.
If YouTube stopped recommended the video at some point, then you would say "had been recommending". They were recommending it, but they are not doing so any more.
The fact that you watched the video at some time in the past doesn't change this. You might do something because of an action that is ongoing even after you acted. For example, "The rock fell to the ground because gravity exerts a force between all objects with mass." Gravity continues to work after this particular rock fell, so it is correct to use the present tense "exerts" to describe gravity in this sentence, even though the particular forces that made this particular rock fall are no longer operating.