Phub

Latest version: v4.7.2

Safety actively analyzes 681881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 9

4.4

Changelog

- Added package headers
- Added `video.is_HD`, `video.is_VR`, `video.embed`
- For authentified accounts, started using `client._granted_token` instead of parsing one on each video page. Helps not fetching the video page when interractions are needed (TODO - Use the first encountered video page instead of the home page for optimisation since the video page is more likely to be fetched afterwards anyway and the home page is heavy).
- `video.fetch` key argument can take a third type of key: `<datakey>|<pagekey>`. The key that requires the least effort will be fetched considering the already cached data and page mediaDefinitions.
- Fixed `video._assert_internal_success` not reporting errors
- Overall improvements on video properties cache
- Disabled query emulation using playlists by default. If you attempt to use a video property that requires query data, and the video does not come from a VideoQuery, an error will be raised unless you set `video.ALLOW_QUERY_SIMULATION = True`. This is supposed to be dissuasive since the manipulation is costly, especially while used in a video iterator.
- Implemented the 43 suggestion while keeping the old properties.
- Video objects now keep track of their parent queries.
- Quality object are a bit more permissive with the input value and can take values of the form '144p' and others.
- Improved the object representations of Queries and Quality objects

4.03.9

Equivalent of PHUB4 for python 3.9 and higher.

See [v4.0 notes](https://github.com/Egsagon/PHUB/releases/tag/v4.0).

v4.0-univ-beta-2.1
Added most features of v4.0-beta-2.1

v4.0-beta-2.1
Fixed user search
Refactored regexes and queries
Tag comparisons
Video categories are now parsed and will link to a phub.locals.Category constant, unless the category does not exists.
User now have a avatar property (only user search injections supported rn)
Default downloader handles requests timeouts and retries to fetch the M3U file.
Added utils.urlify to make URL arguments cleaner

v4.0-univ-beta-2
v4.0-beta-2, but for python 3.9 and higher

4.3.2

Changelog
- Fix 42

4.3.1

Changelog
- Removed a print statement in utils.py
- Fixed 39

4.3

Changelog
- Typo fixes by EchterAlsFake (35)
- [BREAKING] Removed the `Client.search` `feature` argument. Instead, use the boolean `use_hubtraffic` to specify if you want to use a JSONQuery or an HTMLQuery
- [BREAKING] Removed `Client.search_pornstar`. It is much easier to search for a user and you can use more filters
- [BREAKING] Removed Query slices implementations
- Reduced number of query objects to 5 elementary queries (JSONQuery, VideoQuery, UserQuery and FeedQuery)
- Added `Query.sample` as a way to replace query slices. You can use it to filter query items and set a max limit. More controls are to be expected in the futre
- Refactored the built-in CLI script. More functionnalities are to be expected in the future
- Each query now fetch their videos according to a container. By default, the global pornhub container (`consts.re.container`). It can be overrided by Query.container_hint to adapt to different pages. The hint should be a `consts.WrappedRegex` or a special callable.
- The feed object can now be iterated through like a query. Iterate `client.account.feed` instead of `client.account.feed.feed`
- Feed items now have a proper representation
- Added video interaction methods: `video.like()`, `video.favorite()`, `video.watch_later()`
- Added video properties: `video.liked`, `video.is_favorite`, `video.watched`, `video.id`, `video.is_free_premium`, `video.preview` [BETA]
- Added `EmptyQuery`, representing an empty query. Used to silence low priority query errors, e.g. when a pornstar does not have uploads.
- Added a slient option to `client.call` to not log some repetitive calls (e.g. video segment calls who are already displayed by the download backend anyway)
- Added `video._supports_queries` and the `_QuerySupportIndex` dataclass. Used internally by Video objects to keep trace of which queries are available for a video.
- Client and Video objects now keep trace of their tokens for API calls
- Video fetching regex is now split between `consts.re.get_videos` and `consts.re.eval_video` for optimization purposes
- Added markers and preview parsing to video fetching regexes
- User objects representation now displays the user type too
- User objects now "smartly" select a query url and container hint for user videos and user uploads queries (27)
- Added `utils.head` which silently makes HEAD requests to check URLs
- Implemented `video._as_query`. This property emulates what would the initial video data be like if it was fetched by a query. This allows access to more data (watched status, video preview, etc.) but is implemented in the least optimized way (with a temporary pornhub playlist)
- Updated docs
- Wrote a fucking 30 lines changelog

4.2

Boring stuff and breaking query updates

Fixes and improvements
- `dictify` now takes a `recursive` argument to make sure the user wants recusrion over dictified objects
- Implemented `VideoError`, which raises when a video exists but is unavailable (disabled by author, invalid country, etc.)
- Implemented `phub.utils.suppress`, which bypasses videos that can raise `VideoError` when iterating through a query
- Download logs pass from info level to debug level to improve clarity
- Re-implemented challenge resolving at client level
- `client.call` now have the capacity to re-send requests if they fail
- Fixed the built-in display bar length with float numbers
- Improved progress display (added custom message and color support)

Query updates
- **Removed index-based query searching.**. In particular, removed the `query.get` function. This is due to some queries not having a fixed page length, so we cannot know the real index of a video unless we load all the pages before that video, which is costly. It also helps having to declare less different queries. In the future, There should be only one query per obect type (video, user, etc.). Fixes 30 and 33.
- Queries now have a new cached property `query.pages` which let users iterate through each query page. This gives the user more control over the query pages.
- In a future update, i will try to re-implement query slices but relatively to authorized videos.

python
for video in query:
print(video)
is same as
for page in query.pages:
for video in page:
print(video)

Page 4 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.