From 332deaef002ff3733eba9a30d43a7bf00f0b46c6 Mon Sep 17 00:00:00 2001 From: MaFeLP Date: Thu, 29 Aug 2024 22:54:29 +0200 Subject: [PATCH] Fixed an internal server error Deutschlandfunk stopped supplying authors and since they are not used anywhere in the application they have now been removed. Signed-off-by: MaFeLP --- apispec.yaml | 4 +--- app/dlf.py | 1 - src/api-client/models/Article.ts | 9 --------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/apispec.yaml b/apispec.yaml index d93aeb5..5d324e0 100644 --- a/apispec.yaml +++ b/apispec.yaml @@ -317,7 +317,7 @@ components: article: description: "The article object" type: object - required: ["kicker", "title", "description", "author", "content", "figures", "key", "date", "localeDate"] + required: ["kicker", "title", "description", "content", "figures", "key", "date", "localeDate"] properties: kicker: type: string @@ -325,8 +325,6 @@ components: type: string description: type: string - author: - type: string content: type: object required: ["html", "plaintext"] diff --git a/app/dlf.py b/app/dlf.py index e76963e..c01726a 100644 --- a/app/dlf.py +++ b/app/dlf.py @@ -126,7 +126,6 @@ def parse_article(html: str) -> dict[str, str]: "kicker": header.find("span", {"class": "headline-kicker"}).text, "title": header.find("span", {"class": "headline-title"}).text, "description": header.find("p", {"class": "article-header-description"}).text, - "author": header.find("div", {"class": "article-header-author"}).span.text, "content": { "html": section.decode_contents().strip(), "plaintext": section.text.strip(), diff --git a/src/api-client/models/Article.ts b/src/api-client/models/Article.ts index e8d1a4c..da3f9d5 100644 --- a/src/api-client/models/Article.ts +++ b/src/api-client/models/Article.ts @@ -50,12 +50,6 @@ export interface Article { * @memberof Article */ description: string; - /** - * - * @type {string} - * @memberof Article - */ - author: string; /** * * @type {ArticleContent} @@ -95,7 +89,6 @@ export function instanceOfArticle(value: object): boolean { if (!('kicker' in value)) return false; if (!('title' in value)) return false; if (!('description' in value)) return false; - if (!('author' in value)) return false; if (!('content' in value)) return false; if (!('figures' in value)) return false; if (!('key' in value)) return false; @@ -117,7 +110,6 @@ export function ArticleFromJSONTyped(json: any, ignoreDiscriminator: boolean): A 'kicker': json['kicker'], 'title': json['title'], 'description': json['description'], - 'author': json['author'], 'content': ArticleContentFromJSON(json['content']), 'figures': ((json['figures'] as Array).map(ArticleFiguresInnerFromJSON)), 'key': json['key'], @@ -135,7 +127,6 @@ export function ArticleToJSON(value?: Article | null): any { 'kicker': value['kicker'], 'title': value['title'], 'description': value['description'], - 'author': value['author'], 'content': ArticleContentToJSON(value['content']), 'figures': ((value['figures'] as Array).map(ArticleFiguresInnerToJSON)), 'key': value['key'],