Closed bobwatcherx closed 4 months ago
And Channel Country
why i using pornhub.js in client frontend like svelte or react not work because i want no use node js backend . frontend only
code load.js
import { PornHub } from 'pornhub.js'
import {HttpsProxyAgent } from 'https-proxy-agent'
const proxy = 'https://123.30.154.171:7777'
const httpsAgent = new HttpsProxyAgent(proxy)
let res = null
const pornhub = new PornHub()
pornhub.setAgent(httpsAgent)
export async function loadporn(){
const result = await pornhub.searchVideo('jav')
console.log(result.data) // first video
return result.data
}
app.svelte
<script>
import {onMount} from 'svelte'
import {loadporn} from './func/load.js'
onMount(async()=>{
res = await loadporn()
})
</script>
{JSON.stringify(res)}
This library can only be used on Node.js server side.
You can use pornhub.videoList({ order:'Hottest', country: 'India' })
to get the video list in a specific country.
if i send text country . then find and list videos based by country
example
let mymodel = model.FindByCountry("india")
then list all videos per page from country india
give me example code