Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,18 @@ def details_fn(query):
|
|
56 |
title = soup.title.string
|
57 |
print (title)
|
58 |
description = soup.find('meta', attrs={'name':'description'})
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
file = open("myfile.txt", "w")
|
61 |
file.close()
|
62 |
|
|
|
56 |
title = soup.title.string
|
57 |
print (title)
|
58 |
description = soup.find('meta', attrs={'name':'description'})
|
59 |
+
try:
|
60 |
+
print (dir(description))
|
61 |
+
except Exception as e:
|
62 |
+
print (e)
|
63 |
+
try:
|
64 |
+
print (description.text)
|
65 |
+
except Exception as e:
|
66 |
+
print (e)
|
67 |
+
try:
|
68 |
+
print (description.string)
|
69 |
+
except Exception as e:
|
70 |
+
print (e)
|
71 |
file = open("myfile.txt", "w")
|
72 |
file.close()
|
73 |
|