Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -272,8 +272,11 @@ def get_article_summary(article: str) -> str:
|
|
272 |
|
273 |
def extract_article(url):
|
274 |
# Webseite herunterladen
|
275 |
-
|
276 |
-
|
|
|
|
|
|
|
277 |
# Überprüfen, ob die Anfrage erfolgreich war (Status-Code 200)
|
278 |
if response.status_code == 200:
|
279 |
# HTML-Inhalt parsen
|
|
|
272 |
|
273 |
def extract_article(url):
|
274 |
# Webseite herunterladen
|
275 |
+
headers = {
|
276 |
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
|
277 |
+
}
|
278 |
+
response = requests.get(url, headers=headers)
|
279 |
+
|
280 |
# Überprüfen, ob die Anfrage erfolgreich war (Status-Code 200)
|
281 |
if response.status_code == 200:
|
282 |
# HTML-Inhalt parsen
|