Today, I wanted to try downloading a movie from an .m3u list that I had in / hdd / movie
then I entered the tivustream.m3u list
and so this was born
261a05d5e28c.jpg
now what's the problem?
58d8282d3e0.png
the only hitch, is that if a link contains an ssl certificate, it can give an error, it is not said that it downloads), but the debugging is clear.
With DownloadWithPorgress there is this risk: yet ssl is within it.
I don't know how to get around this, I would have published this version today, but I want to understand if there is a system or if any of you have suggestions :)
self.download = downloadWithProgress(urlm3u, in_tmp)
self.download.addProgress(self.downloadProgress)
self.download.start().addCallback(self.check).addErrback(self.showError)
tools.download.py
class downloadWithProgress:
def __init__(self, url, outputfile, contextFactory = None, *args, **kwargs):
if hasattr(client, '_parse'):
scheme, host, port, path = client._parse(url)
else:
try:
from twisted.web.client import _URI as URI
except ImportError:
from twisted.web.client import URI
uri = URI.fromBytes(url)
scheme = uri.scheme
host = uri.host
port = uri.port
path = uri.path
self.factory = HTTPProgressDownloader(url, outputfile, *args, **kwargs)
if scheme == 'https':
self.connection = reactor.connectSSL(host, port, self.factory, ssl.ClientContextFactory())
else:
self.connection = reactor.connectTCP(host, port, self.factory)
Display More
happy 1st of May to all