summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-11-22 17:59:29 +0100
committerYves Fischer <yvesf-git@xapek.org>2014-11-22 17:59:29 +0100
commit8bcc1923ec65d5c3fb216847b098f2e42159bea3 (patch)
tree4b8ca6a81205e8fd4ac6591ee5e14def93cb6644
parent32b069aad22041fa9cf79790655c425796b80d03 (diff)
downloadscripts-8bcc1923ec65d5c3fb216847b098f2e42159bea3.tar.gz
scripts-8bcc1923ec65d5c3fb216847b098f2e42159bea3.zip
urlencode
-rwxr-xr-ximdb-lookup/imdbinfo.py6
-rw-r--r--imdb-lookup/index.jinja2.html2
2 files changed, 4 insertions, 4 deletions
diff --git a/imdb-lookup/imdbinfo.py b/imdb-lookup/imdbinfo.py
index 09b9c03..bf01fa0 100755
--- a/imdb-lookup/imdbinfo.py
+++ b/imdb-lookup/imdbinfo.py
@@ -11,9 +11,9 @@ import argparse
import math
import logging
try:
- from urllib.parse import quote_plus
+ from urllib.parse import urlencode
except:
- from urllib import quote_plus
+ from urllib import urlencode
try:
import tmdbsimple as tmdb
@@ -183,7 +183,7 @@ def do_index(args, imdb_ids):
'input' : imdb_ids,
'tmdbcache' : Protector(tmdbcache),
'title' : 'Movie overview',
- 'quote_plus' : quote_plus,
+ 'urlencode' : urlencode,
}
assert not os.path.exists("index.html"), "index.html already exists"
stream = template.generate(mapping)
diff --git a/imdb-lookup/index.jinja2.html b/imdb-lookup/index.jinja2.html
index 977287f..abf194e 100644
--- a/imdb-lookup/index.jinja2.html
+++ b/imdb-lookup/index.jinja2.html
@@ -16,7 +16,7 @@
<h2 style="">{{ info.title }}</h2>
<div style="width: 185px; float: left; min-height: 200px; border: 2px solid gray;">
{% if posterBase64 %}
- <a href="{{quote_plus(filename)}}">
+ <a href="{{urlencode(filename)}}">
<img src="{{ posterBase64 }}" />
</a>
{% else %}