Skip to content

Releases: EchterAlsFake/PHUB

v4.4

22 Jan 15:28
Compare
Choose a tag to compare

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

v4.3.2

31 Dec 10:12
997535e
Compare
Choose a tag to compare

Changelog

v4.3.1

30 Dec 08:12
Compare
Choose a tag to compare

Changelog

  • Removed a print statement in utils.py
  • Fixed #39

v4.3

29 Dec 17:53
0ea74d5
Compare
Choose a tag to compare

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

v4.2

05 Dec 16:54
Compare
Choose a tag to compare

V4.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.
for video in query:
    print(video)
# is same as
for page in query.pages:
    for video in page:
        print(video)

v4.1.5

27 Nov 12:17
343ff52
Compare
Choose a tag to compare
  • Fix #27 and #28
  • Pornstars now have their own objects inheriting from users, so their videos and uploads can be accessed separately
  • Added FFMPEG progress callback support thanks to @EchterAlsFake (#29)

v4.1.4-1

20 Nov 20:44
Compare
Choose a tag to compare

Fixes #27 (again)

v4.1.4

20 Nov 08:27
Compare
Choose a tag to compare

Changelog

  • Added dict serializer for each PHUB object
  • client.get can now initialise videos from videos
  • Added path annotations
  • Renamed query objects
  • Subscriptions parsing with client.account.subscriptions
  • Fix #27

v4.1.3-1

16 Oct 15:14
Compare
Choose a tag to compare

Fixed an image error preventing account clients to initialise.

v4.1.3

16 Oct 09:12
Compare
Choose a tag to compare
  • Image objects can now handle multiple image sources if the default server is down
  • Implemented experimental RSS flux.
  • User avatars can be fetched from Users objects using the User.avatar property.
  • User avatars are refreshed with User.refresh.
  • Added a Client.search_pornstar method.