aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/search.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/search.py')
-rw-r--r--youtube/search.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/youtube/search.py b/youtube/search.py
index 34df76f..da8cdab 100644
--- a/youtube/search.py
+++ b/youtube/search.py
@@ -78,7 +78,7 @@ def get_search_page():
search_info = yt_data_extract.extract_search_info(polymer_json)
if search_info['error']:
- return flask.render_template('error.html', error_message = search_info['error'])
+ return flask.render_template('error.html', error_message=search_info['error'])
for extract_item_info in search_info['items']:
util.prefix_urls(extract_item_info)
@@ -95,16 +95,18 @@ def get_search_page():
no_autocorrect_query_url = util.URL_ORIGIN + '/search?' + urllib.parse.urlencode(no_autocorrect_query_string, doseq=True)
corrections['original_query_url'] = no_autocorrect_query_url
- return flask.render_template('search.html',
- header_playlist_names = local_playlist.get_playlist_names(),
- query = query,
- estimated_results = search_info['estimated_results'],
- estimated_pages = search_info['estimated_pages'],
- corrections = search_info['corrections'],
- results = search_info['items'],
- parameters_dictionary = request.args,
+ return flask.render_template(
+ 'search.html',
+ header_playlist_names=local_playlist.get_playlist_names(),
+ query=query,
+ estimated_results=search_info['estimated_results'],
+ estimated_pages=search_info['estimated_pages'],
+ corrections=search_info['corrections'],
+ results=search_info['items'],
+ parameters_dictionary=request.args,
)
+
@yt_app.route('/opensearch.xml')
def get_search_engine_xml():
with open(os.path.join(settings.program_directory, 'youtube/opensearch.xml'), 'rb') as f: