Implement clean audio and video transcoding pipeline
This commit is contained in:
parent
ca17e44687
commit
ac92eef8db
8 changed files with 540 additions and 74 deletions
|
|
@ -25,12 +25,12 @@ class FeedNameFilter:
|
|||
|
||||
|
||||
def execute_spider(queue, name, url):
|
||||
from repub.media import check_runtime
|
||||
from repub.spiders.rss_spider import RssFeedSpider
|
||||
from scrapy.crawler import CrawlerProcess
|
||||
from scrapy.settings import Settings
|
||||
from scrapy.utils.project import get_project_settings
|
||||
|
||||
from .spiders.rss_spider import RssFeedSpider
|
||||
|
||||
try:
|
||||
settings: Settings = {
|
||||
**get_project_settings(),
|
||||
|
|
@ -59,6 +59,13 @@ def execute_spider(queue, name, url):
|
|||
"VIDEO_STORE": f"out/{name}/images",
|
||||
"FILES_STORE": f"out/{name}/files",
|
||||
}
|
||||
if not check_runtime(
|
||||
settings.get("REPUBLISHER_FFMPEG_ENCODERS"),
|
||||
settings.get("REPUBLISHER_FFMPEG_CODECS"),
|
||||
):
|
||||
logger.error("Runtime depenencies not met")
|
||||
queue.put("missing dependencies")
|
||||
return
|
||||
process = CrawlerProcess(settings)
|
||||
# colorlog.load_colorlog()
|
||||
process.crawl(RssFeedSpider, feed_name=name, urls=[url])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue