RepositoryTypeScriptTWĐài Loan
pionxzh

pionxzh/Pornhub.js

Powerful PornHub API for Node.js

115sao
17fork
4issue
1lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: webmaster

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: hubtraffic

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: porn

#1 Repository Của Tháng

🔧 Thư viện Node.js biến trang web thành API dùng được

Parse trang, tìm kiếm có phân trang, lấy URL stream — PornHub.js là cách dễ nhất để truy cập dữ liệu site này từ Node.js.

PornHub.js của pionxzh là thư viện TypeScript (cần Node.js >= 14) đóng vai trò trung gian: nó đọc HTML của các trang trên Pornhub rồi trả về object JSON sạch, thay vì để bạn tự xử lý parsing thủ công. Dự án cũng tích hợp luôn WebMaster API của Hubtraffic cho dân webmaster muốn lấy thống kê. Cài bằng npm install pornhub.js rồi import { PornHub } from 'pornhub.js' là dùng được ngay.

✨ Điểm nổi bật

  • Parser đầy đủ loại đối tượng: parse trang thành object cho Video, Album, Photo, Gif, PornStar, Model và Channel.
  • Search có hỗ trợ query: tìm Video, Album, Gif, PornStar, Model, hỗ trợ toàn bộ query parameter.
  • Pagination: kết quả tìm kiếm hỗ trợ phân trang.
  • WebMaster API: tích hợp sẵn API của Hubtraffic, có tài liệu riêng tại /doc/WebMaster.md.
  • Thông tin video chi tiết: qua pornhub.video(url) trả về title, views, duration, vote, tags, categories, pornstar, cùng danh sách mediaDefinitions gồm format (hls) và URL theo từng quality.
  • Tài liệu phân tách rõ: DOCUMENT.md cho toàn bộ API, Page.md cho parser trang, Search.md cho tìm kiếm, có Migration Guide cho người nâng cấp từ v0.x lên v1.x.

💪 Vì sao đáng chú ý

Điểm khác biệt chính là phạm vi: thay vì chỉ là một client HTTP mỏng, thư viện xử lý luôn phần parsing HTML — trả về vote.up/down/rating, durationFormatted, hay provider (username + url) thay vì để bạn tự bóc chuỗi. Kết hợp search + pagination, đây là công cụ hợp lý nếu cần build công cụ phân tích, dashboard hoặc pipeline dữ liệu quanh nội dung site này.

Lưu ý quan trọng: tải video không còn được hỗ trợ. README giải thích do thay đổi từ phía Pornhub nên không cung cấp được link tải; thư viện chỉ trả raw mediaDefinitions. Nếu vẫn muốn tải, bạn có thể tự xử lý thông tin m3u8 hoặc dùng yt-dlp — nhưng phần đó nằm ngoài phạm vi dự án. Dự án mở theo giấy phép MIT.


#NodeJS #TypeScript #WebScraper #WebMasterAPI #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryJavaScript
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.

187
May 6, 2024
RepositoryPHP
Joel2B/XVideos-PornHub-RedTube-API

This script scrapes the HTML from different web pages to get the information from the video (XVideos, PornHub, RedTube) and you can use it in your own video player.

181
Jun 1, 2024
RepositoryPython
EchterAlsFake/unofficial-api-for-pornhub

Unofficial Python client for xvideos.com: search, metadata extraction, and video download (curl-cffi + selectolax)

175
Nov 17, 2026
RepositoryTypeScript
freeCodeCamp/freeCodeCamp

freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

459.4k
Nov 20, 2026
RepositoryPython
public-apis/public-apis

A collective list of free APIs

501.0k
Nov 22, 2026
RepositoryTypeScript
strapi/strapi

🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript/TypeScript, fully customizable, and developer-first.

73.5k
Nov 21, 2026
RepositoryTypeScript
hexojs/hexo

A fast, simple & powerful blog framework, powered by Node.js.

41.8k
Oct 26, 2026
RepositoryJavaScript
axios/axios

Promise based HTTP client for the browser and node.js

109.4k
Nov 18, 2026
RepositoryJava
mrvivacious/PorNo-_Porn_Blocker

redirects you from porn to positive, fulfilling websites. chrome extension + android app

208
Oct 22, 2026