adpro commited on
Commit
504d0ce
·
verified ·
1 Parent(s): 25b05f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  from bs4 import BeautifulSoup
4
  from rich import print
5
  from urllib.parse import urlparse
6
-
7
  from googlesearch import search
8
  from urllib.parse import parse_qs
9
 
@@ -21,7 +21,7 @@ def run_lora(prompt,site,start,end):
21
  soup = BeautifulSoup(page.text, 'html.parser')
22
  search_results = []
23
  #MjjYud
24
- for g in soup.find_all('div', class_='MjjYud'):
25
  print(g)
26
  title = g.find('h3').text if g.find('h3') else 'No title'
27
  link = g.find('a')['href']
 
3
  from bs4 import BeautifulSoup
4
  from rich import print
5
  from urllib.parse import urlparse
6
+ import re
7
  from googlesearch import search
8
  from urllib.parse import parse_qs
9
 
 
21
  soup = BeautifulSoup(page.text, 'html.parser')
22
  search_results = []
23
  #MjjYud
24
+ for g in soup.find_all('div',class_=re.compile(r'tF2Cxc')):
25
  print(g)
26
  title = g.find('h3').text if g.find('h3') else 'No title'
27
  link = g.find('a')['href']