pornhub-api icon indicating copy to clipboard operation
pornhub-api copied to clipboard

View a video

Open vvettoretti opened this issue 4 years ago • 1 comments

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

vvettoretti avatar Jul 01 '20 08:07 vvettoretti

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.

Derfirm avatar Jul 05 '20 09:07 Derfirm