mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-03 11:04:51 +00:00
Update misc_tools.py
This commit is contained in:
parent
8a544f3651
commit
0e6d6b78d8
1 changed files with 6 additions and 3 deletions
|
|
@ -336,9 +336,12 @@ async def gsearch(self, message):
|
||||||
for result in soup.select(".tF2Cxc"):
|
for result in soup.select(".tF2Cxc"):
|
||||||
link = result.select_one(".yuRUbf a")["href"]
|
link = result.select_one(".yuRUbf a")["href"]
|
||||||
title = result.select_one(".DKV0Md").text
|
title = result.select_one(".DKV0Md").text
|
||||||
self.log.info(result)
|
if snippet := result.find(class_="VwiC3b yXK7lf lVm3ye r025kc hJNv6b"):
|
||||||
snippet = result.find(class_="VwiC3b yXK7lf lVm3ye r025kc hJNv6b").get_text() if result.find(class_="VwiC3b yXK7lf lVm3ye r025kc hJNv6b") else "-"
|
snippet = snippet.get_text()
|
||||||
self.log.info(snippet)
|
elif snippet := result.find(class_="LEwnzc Sqrs4e"):
|
||||||
|
snippet = snippet.get_text()
|
||||||
|
else:
|
||||||
|
snippet = "-"
|
||||||
# appending data to an array
|
# appending data to an array
|
||||||
data.append(
|
data.append(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue