Open AlexPlay1 opened 3 hours ago
Thanks for pointing that out!
Could you please provide us with a URL of such a video, so that I can create an exception class for it?
Thanks.
I don't think that the video is private. When I enter the URL PornHub shows me that the video is not available in my region. We actually already have a mechanism which should detect that, but it seems that it failed, so I hardened that.
Maybe PornHub gives you other information and for you it shows something like that it's private, but at least for me it doesn't. If you want you can try installing PHUB from git and see if it raises the "RegionBlocked" exception class.
You can do this by:
pip uninstall phub
pip install git+https://github.com/EchterAlsFake/PHUB
see if it raises the "RegionBlocked" exception class.
it does, but i checked with both my home ip and vpn, and both times it said that i need to have that user as a friend to watch the video
I tried with a turkish VPN too, but for me it still shows that it's not available in my country. Since you said it raises the issue I would leave it like that, because I can't really do anything about it now.
Basically the exception class searches for this little string in the HTML code:
<div id="js-player" class="videoGeoUnavailable">
Since the exception raised it means that it's not available for you anyways. I guess even if you would have that person as a friend. Maybe you can add him / her. I don't know if this is possible in your case.
Unfortunately I also can't just upload a video by myself, set it to private and investigate it with my own example, because you need a verified model account for uploading and you need to send your ID card and I am not 18, sooooooo yeeeah.
But thanks for your report anyways :)
so here's the video wrapper code if it helps =) https://privatebin.net/?015340bbb150412a#EH5zupBS45SZSios1TS6hWhQw1q9T67B1B47CDNGEGrd
The package doesn't handle videos being private well, it just throws not that descriptive RegexError "Pattern failed".