[audiochan] extract 'description' texts (#6582)

https://github.com/mikf/gallery-dl/issues/6582#issuecomment-3643689186
This commit is contained in:
Mike Fährmann
2025-12-12 09:13:07 +01:00
parent ab2c03b39e
commit 739e940a95
2 changed files with 19 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ class AudiochanExtractor(Extractor):
post["_http_headers"] = self.headers_dl
post["date"] = self.parse_datetime_iso(file["created_at"])
post["date_updated"] = self.parse_datetime_iso(file["updated_at"])
post["description"] = self._extract_description(
post["description"])
tags = []
for tag in post["tags"]:
@@ -86,6 +88,18 @@ class AudiochanExtractor(Extractor):
break
params["page"] += 1
def _extract_description(self, description, asd=None):
if asd is None:
asd = []
if "text" in description:
asd.append(description["text"])
elif "content" in description:
for desc in description["content"]:
self._extract_description(desc, asd)
return asd
class AudiochanAudioExtractor(AudiochanExtractor):
subcategory = "audio"