mirror of
https://github.com/Paillat-dev/viralfactory.git
synced 2026-01-02 09:16:19 +00:00
27 lines
623 B
Python
27 lines
623 B
Python
|
|
import moviepy as mp
|
||
|
|
|
||
|
|
from abc import abstractmethod
|
||
|
|
|
||
|
|
from ..BaseEngine import BaseEngine
|
||
|
|
|
||
|
|
|
||
|
|
class BaseStockImageEngine(BaseEngine):
|
||
|
|
"""
|
||
|
|
The base class for all Stock Image engines.
|
||
|
|
"""
|
||
|
|
|
||
|
|
@abstractmethod
|
||
|
|
def get(self, query: str, start: float, end: float) -> mp.ImageClip:
|
||
|
|
"""
|
||
|
|
Get a stock image based on a query.
|
||
|
|
|
||
|
|
Args:
|
||
|
|
query (str): The query to search for.
|
||
|
|
start (float): The starting time of the video clip.
|
||
|
|
end (float): The ending time of the video clip.
|
||
|
|
|
||
|
|
Returns:
|
||
|
|
str: The path to the saved image.
|
||
|
|
"""
|
||
|
|
...
|