- Adding support for calling a creator with a tag selected.
It is using a legacy endpoint but there is no other way currently
documented to get the users post filtered by a tag.
- Fixing the User Tags feature to be paginated
offset is not defined in the API but it is supported.
- Fixed the `/posts` endpoint not working:
1. Added check along with metadata to make sure there is a
creator/service information as that is a requirement
2. Fixed the parameter from tags -> tag.
3. Fixed the _paginate call to exit correctly when there is
a key required for the data (it was prematurely exiting)
- Adding a type of caching mechanism for the metadata/user information.
The current logic would work just fine if looking up for a
singular user, however for the multiple posts via normal
filtering would cause it to either:
This builds a local cache during the process so it should
only make a call for the user info once during the process.
- Updating to meet standards
Fixes
1. Reset formatting for unnecessary line changes
2. Removed Type Hinting
3.Replaced f-string with "".format
Updates
Renamed function creator_posts_tags -> creator_tagged_posts
for clarity of what it does (get posts tags vs get tagged posts)
- Fixing check for the length of response:
1. If it is list - just check len
2. If there is a key - check that the key length is less
than the batch.
- add test for '?tag=...' user URLs
plus some code simplifications
The structure of content is like this:
```
<div class="post-content" data-role="post_content-text">
<div class="trix-content">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<body>
<div>
Unspeakable thing are written here<br />
<br />
haiiiiiiiiiiiiiiii hi hi hiii its meee back againnn, plspls leave a comment if uuuu liked it mwah
<3
</div>
</body>
</html>
</div>
</div>
<div class="post-uploads
```
Currently we extract content with:
```
(extr('<div class="post-content', '<div class="post-uploads').partition(">")[2])
```
I propose we just take the body parts:
```
extr('<body>', '</body>')
```
which only happen when surrounding actual content.
It is then easier to use it in the filename content with the `!H`
formatter: `content[:160]!H}`. Otherwise the content currently extracted
can't be decoded with it.
- We change the text.extr 3rd argument to match current structure
('class="post-edit_form"')
- We add support for uploads-audios based on a similar structure as the
attachment type:
- id = data-upload-id
- name = audio_preview-title
- url = src
- type = audio
Fix#6721