Skip to main content

A simple spider of Pornhub

Project description

pornhun爬虫

可以获取pornhub的视频信息

getVideoList 任意页面的视频列表

传入一个url如 www.pornhub.com/video?c=111&page=1
该函数会返回一个PornhubVideo类列表,格式如下:

PornhubVideo类(Class)

用于获取并保存视频信息

函数(methdos)

函数 解释
PornhubVideo(url_or_viewkey, ifGetInfo=False) 构造函数
-url_or_viewkey: str - 视频页面链接或viewkey
-ifGetInfo: bool - 是否获取信息,默认为 False
  -True: 生成对象时获取视频信息。
  -False: 生成对象时不获取视频信息,之后若需获取,可用 GetInfo() 函数。
GetInfo() 获取视频信息
GetRelated(page=1, ifGetInfo=False) 利用视频ID,获取该视频ID的全部相似推荐(共10个),返回格式与getVideoList相同
page: 选择要获取第几页,默认为1。
ifGetInfo: bool - 是否获取信息,默认为 False
  -True: 生成对象时获取视频信息。
  -False: 生成对象时不获取视频信息,之后若需获取,可用 GetInfo() 函数。

属性(properties)

属性 解释
pageUrl: str 原始网页链接地址
viewkey: str 视频viewkey
videoID: str 视频ID,用于获取相关视频
title: str 视频标题
imgUrl: str 视频封面图片链接地址
duration: str 视频时长,格式为 hh:mm:ss
definitions: list 视频所有格式、分辨率及链接

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pornhubSpider-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pornhubSpider-0.0.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file pornhubSpider-0.0.1.tar.gz.

File metadata

  • Download URL: pornhubSpider-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pornhubSpider-0.0.1.tar.gz
Algorithm Hash digest
SHA256 de5fe54aa18c84d70fabd200f656b8d76aff978626e09338f0c48d1e1bdea0bd
MD5 d7897eeef701bb34108f0695d1da61aa
BLAKE2b-256 2124b38f24570bbe65b71945dbb70c9f02b92bcec7a08f8b9b34412a0fe5bdf1

See more details on using hashes here.

File details

Details for the file pornhubSpider-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pornhubSpider-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pornhubSpider-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abf38d5cbc47da1b93d6293227fade393a90b1e0c072de7ccdbd25b359ee53d8
MD5 eeb4d5f7312dc7d512cf54f8306106dc
BLAKE2b-256 f67f3e9c403646bfc942846a623d72b8c1134a088f22cf7360d0b94495e8a6da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page