aboutsummaryrefslogtreecommitdiff
path: root/texttv.py
diff options
context:
space:
mode:
Diffstat (limited to 'texttv.py')
-rwxr-xr-xtexttv.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/texttv.py b/texttv.py
deleted file mode 100755
index a6cf2b1..0000000
--- a/texttv.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python2
-
-from httplib2 import Http
-from urllib import urlencode
-import json
-import re
-import sys
-
-def cleanhtml(raw_html):
- cleanr = re.compile('<.*?>')
- cleantext = re.sub(cleanr, '', raw_html)
- return cleantext
-
-if len(sys.argv) > 1:
- page = sys.argv[1]
-else:
- page = '100'
-
-http = Http()
-url = 'http://api.texttv.nu/api/get/' + page + '?app=python'
-headers = {'Accept': 'application/json', 'Accept-Language': 'en-US,en'}
-response, content = http.request(url, 'GET', headers=headers)
-data = json.loads(content)
-print cleanhtml(data[0]['content'][0])