Skip to content

Commit 126940b

Browse files
committed
More unicode literals
1 parent 43e9c38 commit 126940b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ttp/ttp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _parse_tags(self, match):
234234

235235
# Fix problems with the regex capturing stuff infront of the #
236236
tag = None
237-
for i in u'#\uff03':
237+
for i in '#\uff03':
238238
pos = mat.rfind(i)
239239
if pos != -1:
240240
tag = i

ttp/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
"""Unwind short-links e.g. bit.ly, t.co etc to their canonical links"""
4+
from __future__ import unicode_literals
45
import requests
56

67

@@ -24,5 +25,5 @@ def follow_shortlinks(shortlinks):
2425

2526

2627
if __name__ == "__main__":
27-
shortlinks = ['http://t.co/8o0z9BbEMu', u'http://bbc.in/16dClPF']
28+
shortlinks = ['http://t.co/8o0z9BbEMu', 'http://bbc.in/16dClPF']
2829
print follow_shortlinks(shortlinks)

0 commit comments

Comments
 (0)