灰白草
75408483ad
Support CDN downloads ( #4420 )
...
Closes #4327 .
2024-08-07 20:25:35 +02:00
Lonami Exo
26aa178cf6
Handle FileReferenceExpiredError during download
...
May fix #4341 .
2024-04-02 11:02:32 +02:00
Lonami Exo
b0f9fd1f25
Except all types of timeout error
...
Closes #4172 .
2023-08-18 18:36:30 +02:00
Lonami Exo
131f021d51
Don't attempt thumb download if there is no thumb
2023-07-22 10:52:03 +02:00
Lonami Exo
816b0bdf9f
Fix _get_thumb failed when document had no thumbs
2023-07-21 22:48:12 +02:00
Lonami Exo
0563430314
Slightly improve documentation
2023-02-26 10:10:19 +01:00
Lonami Exo
9f077e356b
Fix downloading vcard and webdoc with Path
...
Closes #4027 .
2023-01-23 08:48:39 +01:00
Lonami Exo
299b090cde
Let download_profile_photo work with min-User
2022-10-03 13:06:27 +02:00
Lonami Exo
7d21b40401
Revert "Make sessions async"
...
This reverts commit d2de0f3aca
.
2022-08-30 12:32:21 +02:00
Tulir Asokan
d2de0f3aca
Make sessions async
...
SQLiteSession is not updated, don't try to use it
2022-05-12 10:36:10 +02:00
Reinier Romero Mir
f9643bf737
Add missing async when downloading from URL ( #3222 )
2021-12-01 20:28:55 +01:00
Anonymous
7c5efee1de
Update to layer 129 and other additions/enhancements ( #3074 )
...
* Apply code corrections for the new layer types.
* Support not passing `user` to `get_permissions`.
* `download_profile_photo` now supports `MessageService`.
* `thumb` in send and edit message.
* Document new known errors.
2021-06-15 22:57:32 +02:00
Lonami
3d350c6087
Don't check if offset is divisible by limit if limit is None
...
Should fix #3058 .
2021-05-16 22:27:29 +02:00
blank X
f6a0f5f979
Make offset divisible by limit ( #3042 )
2021-05-14 08:11:54 +02:00
Lonami Exo
73b9de2085
Correctly sort PhotoSizeProgressive thumb size
2021-02-13 22:47:34 +01:00
Lonami Exo
b0158b3f65
Fix download of PhotoSizeProgressive
...
Closes #1700 .
2021-02-13 22:45:12 +01:00
Lonami Exo
65bf0e4c45
Add missing importç
2021-01-24 01:38:44 +01:00
Lonami Exo
fa99f6a1af
Try to handle TimeoutError during file download
2021-01-24 01:36:10 +01:00
Lonami Exo
dd00829f1e
Ignore PhotoPathSize thumbnail sizes
...
Closes #1655 .
2020-12-19 19:42:07 +01:00
Lonami Exo
c864ef7e16
Refetch msg if fileref expires while downloading docs
...
Closes #1301 .
2020-09-24 10:03:28 +02:00
Lonami Exo
e19aa44d5c
Sort thumbs to ensure -1 is largest
...
Closes #1519 .
2020-08-11 23:14:31 +02:00
Lonami Exo
0cefc73448
Support both str and VideoSize as thumb on download_media
2020-08-11 22:31:12 +02:00
Lonami Exo
ddeefff431
Add a warning when trying to connect to a different account
...
Closes #1172 , and also fixed a typo.
2020-08-08 17:49:00 +02:00
Lonami Exo
e0c3143763
Update documentation with new errors and further clarifications
2020-06-22 13:21:45 +02:00
Lonami Exo
3e511484c7
Support pathlib.Path on download_file
...
Fixes #1379 .
2020-06-06 21:07:22 +02:00
Lonami Exo
7ea4686d6c
Handle FloodWaitError in client.download_media
...
Fixes #1426 . Not entirely happy with the new indirection layer,
but the original __call__ method is already a mess anyway and
the additional cost of an extra call should be neglible compared
to the actual IO.
2020-04-28 20:49:57 +02:00
Lonami Exo
c37dc69592
Fix downloading thumb was using name inferred for video
2020-04-23 21:01:29 +02:00
painor
0e0052888f
Expose key and iv parameter in downloads/uploads ( #1397 )
2020-03-04 16:12:34 +01:00
Lonami Exo
1ec38aa5b2
Update and clarify some docs
...
cc #1388 , #1396
2020-02-28 11:50:16 +01:00
Lonami Exo
bdb74ac235
Support async fd on download/upload ( #1334 )
2019-12-27 12:04:08 +01:00
Lonami Exo
fa736f81af
Handle all entity types on isinstance checks
...
Only the uses of `isinstance` against `InputPeer*` types were
reviewed. Notably, `utils` is exempt on this because it needs
to deal with everything on a case-by-case basis.
Since the addition of `*FromMessage` peers, any manual `isinstance`
checks to determine the type were prone to breaking or being
forgotten to be updated, so a common `helpers._entity_type()`
method was made to share this logic.
Since the conversion to `Peer` would be too expensive, a simpler
check against the name is made, which should be fast and cheap.
2019-12-23 13:52:07 +01:00
Lonami Exo
a1aaa96120
Fix iter_download would not determine file_size alone
2019-10-31 19:38:49 +01:00
Lonami Exo
e1905d0d7a
Avoid using telethon.sync in the examples
2019-08-13 23:33:39 +02:00
Lonami Exo
cbcbda5276
Minor documentation and type hint updates
2019-07-17 12:37:16 +02:00
Lonami Exo
944fb10733
Add missing return self on action/download ctx managers
2019-07-13 21:21:29 +02:00
st7105
c4c263a85b
Use flush() only if it exists ( #1227 )
2019-07-09 11:40:05 +02:00
Lonami Exo
8e36bb4c4d
Link Python keywords with Python's documentation
2019-07-06 12:11:00 +02:00
Lonami
0d9e639f4f
Support asynchronous progress_callback's
2019-07-04 15:34:51 +02:00
Lonami Exo
b6b4ea669d
Remove messy subclassing in the TelegramClient
...
Since it was easy to cause MRO inconsistencies, and it's
not really needed now that self is type hinted as the client.
2019-06-24 17:48:46 +02:00
Lonami
9d6150da37
Fix downloading contacts to path ( #1197 )
2019-06-03 15:44:43 +02:00
Lonami Exo
cf152403ee
Use iter_download on download_file
2019-05-21 16:40:11 +02:00
Lonami Exo
0b0f8f4285
Create a method to iterate downloads
2019-05-21 16:16:32 +02:00
Lonami Exo
7c1c040d50
Update docstrings to have consistent style
2019-05-20 11:57:11 +02:00
Lonami Exo
4ca3517e22
Fix some type hints
2019-05-11 20:12:57 +02:00
Lonami Exo
a7443612f6
Fix download of PhotoStrippedSize to bytes
2019-05-09 18:56:54 +02:00
Lonami Exo
0a3d6106f0
Completely overhaul the documentation
2019-05-09 12:50:09 +02:00
Lonami Exo
d92d989569
Quote type hints
...
Otherwise, sphinx completely butchers the documentation.
2019-05-08 17:16:09 +02:00
Lonami Exo
61613ab6ac
Create a new page with a summary of the method reference
2019-05-06 11:38:26 +02:00
Lonami Exo
cd4b915522
Add type hints to all public methods in the client
2019-05-03 21:38:41 +02:00
Lonami Exo
1e17ef1c98
Apply several lints
2019-05-03 21:38:41 +02:00