Skip to content

Commit 0818572

Browse files
Remove url uploading from send_story/edit_story
1 parent ad74313 commit 0818572

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

pyrogram/methods/stories/edit_story.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ async def edit_story(
4949
5050
.. include:: /_includes/usable-by/users.rst
5151
52-
Note: You must pass one of following paramater *animation*, *photo*, *video*
53-
5452
Parameters:
5553
chat_id (``int`` | ``str``):
5654
Unique identifier (int) or username (str) of the target chat.
@@ -60,7 +58,6 @@ async def edit_story(
6058
media (``str`` | ``BinaryIO``, *optional*):
6159
Video or photo to send.
6260
Pass a file_id as string to send a animation that exists on the Telegram servers,
63-
pass an HTTP URL as a string for Telegram to get a animation from the Internet,
6461
pass a file path as string to upload a new animation that exists on your local machine, or
6562
pass a binary file-like object with its attribute ".name" set for in-memory uploads.
6663
@@ -159,16 +156,6 @@ async def edit_story(
159156
media = raw.types.InputMediaUploadedPhoto(
160157
file=file,
161158
)
162-
elif re.match("^https?://", media):
163-
mime_type = self.guess_mime_type(media)
164-
if mime_type == "video/mp4":
165-
media = raw.types.InputMediaDocumentExternal(
166-
url=media,
167-
)
168-
else:
169-
media = raw.types.InputMediaPhotoExternal(
170-
url=media,
171-
)
172159
else:
173160
media = utils.get_input_media_from_file_id(media)
174161
else:

pyrogram/methods/stories/send_story.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ async def send_story(
5151
5252
.. include:: /_includes/usable-by/users.rst
5353
54-
Note: You must pass one of following paramater *animation*, *photo*, *video*
55-
5654
Parameters:
5755
chat_id (``int`` | ``str``):
5856
Unique identifier (int) or username (str) of the target chat.
@@ -61,7 +59,6 @@ async def send_story(
6159
media (``str`` | ``BinaryIO``):
6260
Video or photo to send.
6361
Pass a file_id as string to send a animation that exists on the Telegram servers,
64-
pass an HTTP URL as a string for Telegram to get a animation from the Internet,
6562
pass a file path as string to upload a new animation that exists on your local machine, or
6663
pass a binary file-like object with its attribute ".name" set for in-memory uploads.
6764
@@ -168,16 +165,6 @@ async def send_story(
168165
media = raw.types.InputMediaUploadedPhoto(
169166
file=file,
170167
)
171-
elif re.match("^https?://", media):
172-
mime_type = self.guess_mime_type(media)
173-
if mime_type == "video/mp4":
174-
media = raw.types.InputMediaDocumentExternal(
175-
url=media,
176-
)
177-
else:
178-
media = raw.types.InputMediaPhotoExternal(
179-
url=media,
180-
)
181168
else:
182169
media = utils.get_input_media_from_file_id(media)
183170
else:

0 commit comments

Comments
 (0)