Show More
@@ -22,4 +22,7 b' class httprangereader(object):' | |||||
22 | end = self.pos + bytes - 1 |
|
22 | end = self.pos + bytes - 1 | |
23 | req.add_header('Range', 'bytes=%d-%s' % (self.pos, end)) |
|
23 | req.add_header('Range', 'bytes=%d-%s' % (self.pos, end)) | |
24 | f = urllib2.urlopen(req) |
|
24 | f = urllib2.urlopen(req) | |
25 |
|
|
25 | data = f.read() | |
|
26 | if bytes: | |||
|
27 | data = data[:bytes] | |||
|
28 | return data |
General Comments 0
You need to be logged in to leave comments.
Login now