⚠️ Alpha release, please don't use
Improvements:
- Reworked and refactored the project structure (each object has its own file)
- Reworked all cached features with functools (no more `__properties__` crap)
- Implemented Pornhub's webmasters program:
- Video object fetch themselves in priority with it, but previous parsing features are still here. Everything can be accessed using `video.fetch('pagekey')` to use the PHUB 3 parser or `video.fetch('datakey')` to use webmasters.
- Client object use it to create better, reliable Search objects. Sadly, these objects don't have length data anymore because of webmasters limitations, but they provide more stable results, and way faster!
- Separated JQuery (JSON-based queries) from HQuery (HTML-based queries, from PHUB 3)
- This implementation improves performance of video data fetching and search queries, since we don't request the whole HTML page anymore.
- Added download backends, even though they all are shit rn.
- Made User.get and Client.get take a single argument and guess if it is a URL or not instead of having 2 arguments
- Regex constants have been and will be more minimized, and use wrappers to compile them to make for better errors messages.
- More custom errors
- Categories, (and later, Tags) can be updated using `utils.update_categories`, where they will be writen directly to the source file for better type highlighting.
- Account object is given more attributes via the `Account.connect` method, called when `Client.login` has finished running. Available features are: real account name, account avatar, wether the account is premium, and account User object representation.
- All images generated by all objects are Image objects, wrapping their URL, name and available sizes to make their downloads easier (with `Image.download`).
- Queries objects use functools caches for **all** pages instead of only the current page.
- Queries caches al their pages and Video outputs.
- Implemented more features for the User object: user bio and informations (thus implementing a cached page system into User objects).
- Video object now parses whole M3U8 segments instead of having the option to give the raw M3U file, this will probably be implemented back in the `downloader` module.
- Video objects have more cached properties: pornstars in the video, video categories, video segment.
This release is not meant for production, as some features are still missing or not well implemented yet. This is just an update on the progress so far.
TODO
- [x] Re-implement account queries (history, liked, etc.)
- [x] Refactor renew regexes
- [x] Find a way to let the user choose their query type for searching
- [x] Implement searching features
- [x] Include PHUB 3 stuff (docs, etc.)
- [x] Actually make progress on the feed object
- [x] Let user choose the size of Images downloads in a better way
- [x] Find a more reliable and less bandwith-costly way to guess a user's type
- [x] Implements tags constants, use them in harmony with categories and videos
- [ ] Handle stuff if a connected account is not from pornhub user type (e.g. a channel or a model)
- [x] Fix relative imports being messy
- [x] Rethink `__init__` files structures