Skip to content

v4.2

Compare
Choose a tag to compare
@Egsagon Egsagon released this 05 Dec 16:54
· 175 commits to master since this release

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)