Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,13 @@ def run_lora(prompt,site,start,end):
|
|
14 |
|
15 |
page = requests.get(j, headers = {'User-agent': 'your bot 0.1'})
|
16 |
soup = BeautifulSoup(page.content,"html.parser")
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
def extract_results(soup):
|
20 |
main = soup.select_one("#main")
|
21 |
|
|
|
14 |
|
15 |
page = requests.get(j, headers = {'User-agent': 'your bot 0.1'})
|
16 |
soup = BeautifulSoup(page.content,"html.parser")
|
17 |
+
import re
|
18 |
+
links = soup.findAll("a")
|
19 |
+
mLink=""
|
20 |
+
#for link in soup.find_all("a", "html.parser", parse_only=SoupStrainer('a')):
|
21 |
+
for link in soup.find_all("a","html.parser",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
|
22 |
+
print (re.split(":(?=http)",link["href"].replace("/url?q=","")))
|
23 |
+
mLink+=str(re.split(":(?=http)",link["href"].replace("/url?q=","").replace("'","")))
|
24 |
def extract_results(soup):
|
25 |
main = soup.select_one("#main")
|
26 |
|