null url
Believe it or not some null urls have been found in the entities stanza, which
is kinda confusing. This script just needs to be careful it skips past these
without throwing an error when it attempts to encode the url.
@@ -45,6 +45,9 @@ def rewrite_line(line):
else:
url = url_dict['url']
+ if not url or url == '':
+ return line
+
url = url.encode('utf8')
u = '{}/?{}'.format(unshrtn_url, urllib.urlencode({'url': url}))
