parent
d62ceb8423
commit
84b4bb5775
|
@ -72,7 +72,7 @@ def clean_css(css: str, page_url: str) -> str:
|
||||||
continue
|
continue
|
||||||
css = css.replace(
|
css = css.replace(
|
||||||
url,
|
url,
|
||||||
f'/element?type=image/png&url={abs_url}'
|
f'{Endpoint.element}?type=image/png&url={abs_url}'
|
||||||
)
|
)
|
||||||
|
|
||||||
return css
|
return css
|
||||||
|
@ -528,7 +528,7 @@ class Filter:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
img_url = urlparse.unquote(urls[0].replace(
|
img_url = urlparse.unquote(urls[0].replace(
|
||||||
f'/{Endpoint.imgres}?imgurl=', ''))
|
f'{Endpoint.imgres}?imgurl=', ''))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Try to strip out only the necessary part of the web page link
|
# Try to strip out only the necessary part of the web page link
|
||||||
|
|
|
@ -186,7 +186,7 @@ def append_nojs(result: BeautifulSoup) -> None:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
nojs_link = BeautifulSoup(features='html.parser').new_tag('a')
|
nojs_link = BeautifulSoup(features='html.parser').new_tag('a')
|
||||||
nojs_link['href'] = f'/{Endpoint.window}?nojs=1&location=' + result['href']
|
nojs_link['href'] = f'{Endpoint.window}?nojs=1&location=' + result['href']
|
||||||
nojs_link.string = ' NoJS Link'
|
nojs_link.string = ' NoJS Link'
|
||||||
result.append(nojs_link)
|
result.append(nojs_link)
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ def append_anon_view(result: BeautifulSoup, config: Config) -> None:
|
||||||
av_link = BeautifulSoup(features='html.parser').new_tag('a')
|
av_link = BeautifulSoup(features='html.parser').new_tag('a')
|
||||||
nojs = 'nojs=1' if config.nojs else 'nojs=0'
|
nojs = 'nojs=1' if config.nojs else 'nojs=0'
|
||||||
location = f'location={result["href"]}'
|
location = f'location={result["href"]}'
|
||||||
av_link['href'] = f'/{Endpoint.window}?{nojs}&{location}'
|
av_link['href'] = f'{Endpoint.window}?{nojs}&{location}'
|
||||||
translation = current_app.config['TRANSLATIONS'][
|
translation = current_app.config['TRANSLATIONS'][
|
||||||
config.get_localization_lang()
|
config.get_localization_lang()
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user