- update requirements
- update tests
- bump httpx version
- update tests
- added console script to quickly download thread media. See
console_usage.sh
in examples
folder for more details
- fixed inheritance problems when downloading media
- minor refactoring
- switched to private module names. All imports should import from the top-level package only, such as
from aio2ch import Board
, rather than importing from privately namespaced modules such as from aio2ch._objects import Board
- minor refactoring
- allow to pass custom
json_loads
function to api_client
(like orjson.loads
or ujson.loads
etc.)
- minor refactoring
- raw text in posts and threads is html-escaped now (e.g. without <...> tags)
- more distinct
File
classes: Image
(jpg, png, gif), Video
(webm, mp4), Sticker
(2ch-specific)
- added
media_type
parameter to get_thread_media
to allow specific attachments download
>>> images_and_videos = await client.get_thread_media(thread, media_type=(Image, Video))
>>> just_images = await client.get_thread_media(thread, media_type=Image)
>>> any_files = await client.get_thread_media(thread)
- improved test coverage
- split test files by test type
- minor refactoring and improvements
get_thread_posts
and get_thread_media
now accepts thread passed as url
>>> thread_media = await client.get_thread_media('https://2ch.hk/test/res/30972.html')
- added boards lists and according checks
- added new exceptions
- more tests
- more code cleanup
- added changelog and readme translations in Russian
- added docstrings
- added project logo (might change in the future)
- moved
api_client
into separate module
- reduced memory usage by using tuples instead of lists
- improved test coverage
- changed some api endpoints
- more typing annotations
- code cleanup
- Api client now can be used as a context manager
- f-strings are now everywhere
- Replace
aiohttp
in favor of httpx
- Typing annotations
download_thread_media
is now using streaming approach
- Minor imports refactoring (
from aio2ch import Api
can be used now, old version still works)
- All methods do not return
status
by default, you need to pass return_status=True
if you want to get it (see examples)
- Added
keywords
parameter to get_board_threads
method
- Added
download_thread_media
method