Commit
·
0a9afa8
1
Parent(s):
75fb93a
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ def get_google_description(keyword):
|
|
| 17 |
return keyword
|
| 18 |
|
| 19 |
def get_description_from_url(url):
|
| 20 |
-
|
| 21 |
soup = BeautifulSoup(response.text, 'html.parser')
|
| 22 |
description_tag = soup.find('meta', {'name': 'description'})
|
| 23 |
|
|
|
|
| 17 |
return keyword
|
| 18 |
|
| 19 |
def get_description_from_url(url):
|
| 20 |
+
response = requests.get(url, timeout=10)
|
| 21 |
soup = BeautifulSoup(response.text, 'html.parser')
|
| 22 |
description_tag = soup.find('meta', {'name': 'description'})
|
| 23 |
|