PEP8 fixes
This commit is contained in:
parent
96a0862f1e
commit
68abd54571
|
@ -253,7 +253,7 @@ def search():
|
|||
|
||||
# Feature to display IP address
|
||||
if search_util.check_kw_ip():
|
||||
html_soup = bsoup(response,"html.parser")
|
||||
html_soup = bsoup(response, "html.parser")
|
||||
response = add_ip(html_soup, request.remote_addr)
|
||||
|
||||
return render_template(
|
||||
|
|
|
@ -189,4 +189,4 @@ path {
|
|||
|
||||
.ip-text-div{
|
||||
color: var(--whoogle-dark-secondary-text) !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,4 +177,4 @@ path {
|
|||
|
||||
.ip-text-div{
|
||||
color: var(--whoogle-secondary-text) !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,4 +38,4 @@ details summary {
|
|||
|
||||
.ip-text-div{
|
||||
padding-top:0!important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,11 +141,11 @@ def append_nojs(result: BeautifulSoup) -> None:
|
|||
|
||||
|
||||
def add_ip(html_soup: BeautifulSoup, ip: str) -> BeautifulSoup:
|
||||
"""Adds the client's IP address to the search results if query contains keywords
|
||||
"""Adds the client's IP address to the search results
|
||||
if query contains keywords
|
||||
|
||||
Args:
|
||||
query: Query of the client
|
||||
response: The search result containing the keywords
|
||||
html_soup: The parsed search result containing the keywords
|
||||
ip: ip address of the client
|
||||
|
||||
Returns:
|
||||
|
@ -179,4 +179,4 @@ def add_ip(html_soup: BeautifulSoup, ip: str) -> BeautifulSoup:
|
|||
|
||||
# Inserting the element
|
||||
ref_element.insert_before(ip_tag)
|
||||
return html_soup
|
||||
return html_soup
|
||||
|
|
|
@ -166,9 +166,6 @@ class Search:
|
|||
def check_kw_ip(self) -> bool:
|
||||
"""Checks for keywords related to 'my ip' in the query
|
||||
|
||||
Args:
|
||||
query: Query of the client
|
||||
|
||||
Returns:
|
||||
bool
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user