Update app.py
Browse files
app.py
CHANGED
@@ -42,15 +42,17 @@ def google(name):
|
|
42 |
soup = BeautifulSoup(r.text,"html.parser")
|
43 |
|
44 |
heading_object=soup.find_all('div')
|
45 |
-
|
46 |
for info in heading_object:
|
47 |
|
48 |
-
|
49 |
if '<div class="BNeawe s3v9rd AP7Wnd"><div><div><div class="BNeawe s3v9rd AP7Wnd">' in str(info):
|
50 |
if '›' not in str(info.text) :
|
51 |
result.add(info.text)
|
|
|
52 |
for i in result:
|
53 |
-
text = text +i+"\n"
|
|
|
54 |
return text
|
55 |
|
56 |
def greet(name1):
|
|
|
42 |
soup = BeautifulSoup(r.text,"html.parser")
|
43 |
|
44 |
heading_object=soup.find_all('div')
|
45 |
+
|
46 |
for info in heading_object:
|
47 |
|
48 |
+
|
49 |
if '<div class="BNeawe s3v9rd AP7Wnd"><div><div><div class="BNeawe s3v9rd AP7Wnd">' in str(info):
|
50 |
if '›' not in str(info.text) :
|
51 |
result.add(info.text)
|
52 |
+
n=1
|
53 |
for i in result:
|
54 |
+
text = text +str(n)+"\t"+i+"\n\n"
|
55 |
+
n=n+1
|
56 |
return text
|
57 |
|
58 |
def greet(name1):
|