Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cogeco.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import urllib, urllib2, re
from cookies import Cookies
from HTMLParser import HTMLParser

class Cogeco:
"""
Expand Down Expand Up @@ -37,7 +38,8 @@ def authorize(streamProvider, username, password):
return None
Cookies.saveCookieJar(jar)

html = resp.read()
h = HTMLParser()
html = h.unescape(resp.read())

# TODO: this could be made a function to to parse and return the value based on an expression
action = re.search('<form.*?action=\"(.*?)\"', html, re.MULTILINE)
Expand Down