Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8c9c592cf | ||
|
|
98cd620f23 | ||
|
|
5e8e10e2fa |
4
.github/workflows/deploy.yml
vendored
4
.github/workflows/deploy.yml
vendored
@@ -90,10 +90,10 @@ jobs:
|
|||||||
IMAGE="${DOCKERHUB_USER}/${IMAGE_NAME}:latest"
|
IMAGE="${DOCKERHUB_USER}/${IMAGE_NAME}:latest"
|
||||||
if [ -n "${VERSION_TAG}" ]; then
|
if [ -n "${VERSION_TAG}" ]; then
|
||||||
VERSIONED_IMAGE="${DOCKERHUB_USER}/${IMAGE_NAME}:${VERSION_TAG}"
|
VERSIONED_IMAGE="${DOCKERHUB_USER}/${IMAGE_NAME}:${VERSION_TAG}"
|
||||||
docker build -t "${IMAGE}" -t "${VERSIONED_IMAGE}" .
|
docker build --no-cache -t "${IMAGE}" -t "${VERSIONED_IMAGE}" .
|
||||||
docker push "${VERSIONED_IMAGE}"
|
docker push "${VERSIONED_IMAGE}"
|
||||||
else
|
else
|
||||||
docker build -t "${IMAGE}" .
|
docker build --no-cache -t "${IMAGE}" .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker push "${IMAGE}"
|
docker push "${IMAGE}"
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ def fetch_transcript(video_id: str) -> str:
|
|||||||
|
|
||||||
ydl_opts = {
|
ydl_opts = {
|
||||||
"skip_download": True,
|
"skip_download": True,
|
||||||
"writeautomaticsub": True,
|
|
||||||
"subtitleslangs": ["ko", "en"],
|
|
||||||
"subtitlesformat": "json3",
|
|
||||||
"format": "worst",
|
|
||||||
"quiet": True,
|
"quiet": True,
|
||||||
"no_warnings": True,
|
"no_warnings": True,
|
||||||
}
|
}
|
||||||
@@ -38,7 +34,7 @@ def fetch_transcript(video_id: str) -> str:
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
|
||||||
info = ydl.extract_info(url, download=False)
|
info = ydl.extract_info(url, ie_key="Youtube", download=False, process=False)
|
||||||
finally:
|
finally:
|
||||||
if "cookiefile" in ydl_opts:
|
if "cookiefile" in ydl_opts:
|
||||||
os.unlink(ydl_opts["cookiefile"])
|
os.unlink(ydl_opts["cookiefile"])
|
||||||
|
|||||||
Reference in New Issue
Block a user