pornhub-api
pornhub-api copied to clipboard
View a video
Hi. I would like to make a script that views a video and makes the viewer counter increment. Any ideas on how making it? Maybe i should just GET the page with the video, and then download it? Thank you in advance
Hello @vvettoretti! Thank you for your interest in the project and the question. The api that uses the library is "public", which means that, unfortunately, there is no possibility for authorized requests. Using the library, you can search for the desired content, web links to it for further various actions.
I can advise you to use the library to search or select the necessary URLs, and to "simulate" the viewing, use a private api (which uses the resource itself), substituting authorization data there.
Unfortunately, I didn’t research exactly how the resource(pornhun) tracks video viewing, it’s possible to request and start downloading content through a get request, it may be worth using lightweight chrome or selenium to emulate user behavior.