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
|
|
@ -187,17 +187,19 @@ class RssFeedSpider(BaseRssFeedSpider):
|
|||
if entry.get("image"):
|
||||
image_urls.append(entry.get("image").href)
|
||||
for enc in entry.enclosures:
|
||||
file_type = determine_file_type(
|
||||
url=enc.get("href"), mimetype=enc.get("type")
|
||||
)
|
||||
url = enc.get("href")
|
||||
file_type = determine_file_type(url=url, mimetype=enc.get("type"))
|
||||
item.append(
|
||||
E.enclosure(
|
||||
E.url(self.rewrite_file_url(file_type, enc.get("href"))),
|
||||
E.url(self.rewrite_file_url(file_type, url)),
|
||||
E.length(enc.get("length")),
|
||||
E.type(enc.get("type")),
|
||||
)
|
||||
)
|
||||
add_url(file_type, enc.get("href"))
|
||||
self.logger.debug(
|
||||
f"feed {self.feed_name} encountered enclsoure {url} {file_type}"
|
||||
)
|
||||
add_url(file_type, url)
|
||||
|
||||
if "content" in entry:
|
||||
for c in entry.content:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue