JustalK / PORNHUB-API

A powerful and complete scrapper for the very famous pornhub.com. This javascript module for node give you the possibility, through an API with many options, to scrap any information out of a page or the search page.
MIT License
130 stars 29 forks source link

is it possible to get only download link? #25

Closed arugaz closed 3 years ago

arugaz commented 3 years ago

when i execute this

const pornhub = require('@justalk/pornhub-api'); const video = await pornhub.page(url, ['title','pornstars','download_urls']) video.then((result) => { console.log(result.download_urls) })

its will appear this { '720P': 'links', '240P': 'links', '480P': 'links' }

but when i execute this const pornhub = require('@justalk/pornhub-api'); const video = await pornhub.page(url, ['title','pornstars','download_urls']) video.then((result) => { console.log(result.download_urls.720P) }) its give me an error. do you have any solution?

arugaz commented 3 years ago

when i execute this

const pornhub = require('@justalk/pornhub-api'); const video = await pornhub.page(url, ['title','pornstars','download_urls']) video.then((result) => { console.log(result.download_urls) })

its will appear this { '720P': 'links', '240P': 'links', '480P': 'links' }

but when i execute this const pornhub = require('@justalk/pornhub-api'); const video = await pornhub.page(url, ['title','pornstars','download_urls']) video.then((result) => { console.log(result.download_urls.720P) }) its give me an error. do you have any solution?

hmm I've got a solution console.log(res["download_urls"]['720P'])