def _post(self, url, data): data = urllib.urlencode(data) return dreamfilm_request(url, data) content = urllib2.urlopen(url=url, data=data).read() return content
def _fetch_html(self, url, page=None): if page: url = url + ('?page=%d' % page) return dreamfilm_request(url) response = urllib2.urlopen(url) return response.read()
def fetch_html(url): return dreamfilm_request(url) response = urllib2.urlopen(url) return response.read()