Skip to content

Commit ba62b5e

Browse files
committed
Remove moviepy [#1] Done
1 parent bbb76c8 commit ba62b5e

File tree

5 files changed

+20
-6
lines changed

5 files changed

+20
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ The current types are in [types.py](/instagrapi/types.py):
7676
| UserShort | Short public user data (used in Usertag, Comment, Media, Direct) |
7777
| Usertag | Tag user in Media (coordinates + UserShort) |
7878
| Location | GEO location (GEO coordinates, name, address) |
79-
| Hashtag | Hashtag object (id, name, picture)
79+
| Hashtag | Hashtag object (id, name, picture) |
8080
| Collection | Collection of medias (name, picture and list of medias) |
8181
| Comment | Comments to Media |
8282
| StoryMention | Mention users in Story (user, coordinates and dimensions) |

instagrapi/mixins/igtv.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import List
66
from uuid import uuid4
77
from PIL import Image
8-
import moviepy.editor as mp
98

109
from instagrapi import config
1110
from instagrapi.extractors import extract_media_v1
@@ -188,6 +187,12 @@ def igtv_configure(
188187
def analyze_video(path: Path, thumbnail: Path = None) -> tuple:
189188
"""Analyze and crop thumbnail if need
190189
"""
190+
191+
try:
192+
import moviepy.editor as mp
193+
except ImportError:
194+
raise Exception('Please install moviepy>=1.0.3 and retry')
195+
191196
print(f'Analizing IGTV file "{path}"')
192197
video = mp.VideoFileClip(str(path))
193198
width, height = video.size

instagrapi/mixins/video.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from pathlib import Path
55
from typing import List
66
from uuid import uuid4
7-
import moviepy.editor as mp
87
from urllib.parse import urlparse
98

109
from instagrapi import config
@@ -375,6 +374,12 @@ def video_configure_to_story(
375374
def analyze_video(path: Path, thumbnail: Path = None) -> tuple:
376375
"""Analyze video file
377376
"""
377+
378+
try:
379+
import moviepy.editor as mp
380+
except ImportError:
381+
raise Exception('Please install moviepy>=1.0.3 and retry')
382+
378383
print(f'Analizing video file "{path}"')
379384
video = mp.VideoFileClip(str(path))
380385
width, height = video.size

instagrapi/story.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22
from pathlib import Path
33
from typing import List
44

5-
from moviepy.editor import TextClip, CompositeVideoClip, VideoFileClip, ImageClip
5+
try:
6+
from moviepy.editor import (
7+
TextClip, CompositeVideoClip, VideoFileClip, ImageClip
8+
)
9+
except ImportError:
10+
raise Exception('Please install moviepy==1.0.3 and retry')
611

712
from .types import StoryBuild, StoryMention
813

setup.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
setup(
2121
name='instagrapi',
22-
version='1.3.2',
22+
version='1.3.3',
2323
author='Mikhail Andreev',
2424
author_email='[email protected]',
2525
license='MIT',
@@ -28,7 +28,6 @@
2828
'pytz==2020.1',
2929
'requests==2.24.0',
3030
'PySocks==1.7.1',
31-
'moviepy==1.0.3',
3231
'Pillow==7.2.0',
3332
'pydantic==1.7.2'
3433
],

0 commit comments

Comments
 (0)