pionxzh / Pornhub.js

Powerful PornHub API for Node.js
MIT License
93 stars 17 forks source link

Video sources returns empty array #120

Closed cocapeanut closed 2 months ago

cocapeanut commented 2 months ago
let results: VideoResponse;

  try {
    results = await pornhub.video(id) ;
  } catch (error) {
    console.error('Error fetching videos:', error);
  }
{
  id: '6682a2848395f',
  url: 'https://www.pornhub.com/view_video.php?viewkey=6682a2848395f',
  mediaDefinitions: [],
  title: 'Cleaning Lady Jessica Night Exposes your Dirty Secrets',
  views: 5800,
  vote: { up: 12, down: 1, total: 13, rating: 0.92 },
  premium: false,
  thumb: 'https://ei.phncdn.com/videos/202407/01/454594211/original/(m=q-_V-PZbeaf8Ggaaaa)(mh=7cH5JYpmTPx3wnpc)0.jpg',
  preview: 'https://ei.phncdn.com/videos/202407/01/454594211/original/(m=q-_V-PZbeaAaGwObaaaa)(mh=G92ktGNrRrPa8-mv)0.jpg',
  videos: [],
  provider: { username: 'itsPOV', url: '/users/itspov' },
  tags: [
    'morepov',       'pointofview',
    'cleaner',       'cheating',
    'oral',          'jessica-night',
    'fucking',       'doggystyle',
    'missionary',    'fingering',
    'cleaning-lady', 'point-of-view',
    'bubble-butt',   'moaning',
    'shaved-pussy'
  ],
  pornstars: [],
  categories: [
    'Big-Ass',
    'Big-Dick',
    'Brunette',
    'HD-Porn',
    'MILF',
    'POV',
    'Role-Play'
  ],
  duration: 625,
  durationFormatted: '10:25',
  uploadDate: 2024-07-01T12:36:06.000Z
}
pionxzh commented 2 months ago

They changed the response format. Fixed. Try v1.12.2

cocapeanut commented 2 months ago
➜ npm install pornhub.js@1.12.2 --save
npm error code ETARGET
npm error notarget No matching version found for pornhub.js@1.12.2.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.

when I force it ➜ npm install github:pionxzh/Pornhub.js#pornhub.js-v1.12.2 the install works but the package is empty

image

https://www.npmjs.com/package/pornhub.js its still 1.12.1 here

pionxzh commented 2 months ago

Sorry, I think the auto pulish ci is not working properly. I have manually published it again.