Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,14 +15,11 @@ def run_lora(prompt,site,start,end):
|
|
15 |
soup = BeautifulSoup(response.content)
|
16 |
# Tìm tất cả các liên kết trong kết quả tìm kiếm
|
17 |
results = soup.find_all('a')
|
18 |
-
|
19 |
# Lọc và hiển thị các liên kết
|
20 |
-
for link in
|
21 |
-
|
22 |
-
|
23 |
-
# Loại bỏ prefix '/url?q=' và tham số URL không cần thiết
|
24 |
-
full_url = href.split('/url?q=')[1].split('&')[0]
|
25 |
-
print(full_url)
|
26 |
|
27 |
# Lọc theo ngày tháng (nếu ngày tháng được cung cấp trong kết quả)
|
28 |
date_elements = soup.find_all('span', class_='f')
|
|
|
15 |
soup = BeautifulSoup(response.content)
|
16 |
# Tìm tất cả các liên kết trong kết quả tìm kiếm
|
17 |
results = soup.find_all('a')
|
18 |
+
mLink=""
|
19 |
# Lọc và hiển thị các liên kết
|
20 |
+
for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
|
21 |
+
print (re.split(":(?=http)",link["href"].replace("/url?q=","")))
|
22 |
+
mLink+=str(re.split(":(?=http)",link["href"].replace("/url?q=","").replace("'","")))
|
|
|
|
|
|
|
23 |
|
24 |
# Lọc theo ngày tháng (nếu ngày tháng được cung cấp trong kết quả)
|
25 |
date_elements = soup.find_all('span', class_='f')
|