We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43e9c38 commit 126940bCopy full SHA for 126940b
ttp/ttp.py
@@ -234,7 +234,7 @@ def _parse_tags(self, match):
234
235
# Fix problems with the regex capturing stuff infront of the #
236
tag = None
237
- for i in u'#\uff03':
+ for i in '#\uff03':
238
pos = mat.rfind(i)
239
if pos != -1:
240
tag = i
ttp/utils.py
@@ -1,6 +1,7 @@
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
"""Unwind short-links e.g. bit.ly, t.co etc to their canonical links"""
4
+from __future__ import unicode_literals
5
import requests
6
7
@@ -24,5 +25,5 @@ def follow_shortlinks(shortlinks):
24
25
26
27
if __name__ == "__main__":
- shortlinks = ['http://t.co/8o0z9BbEMu', u'http://bbc.in/16dClPF']
28
+ shortlinks = ['http://t.co/8o0z9BbEMu', 'http://bbc.in/16dClPF']
29
print follow_shortlinks(shortlinks)
0 commit comments