Definition at line 191 of file pydl.py.
def pydl.ThreadProc.__init__ |
( |
|
self, |
|
|
|
urlq, |
|
|
|
tq, |
|
|
|
dl_site_info, |
|
|
|
report |
|
) |
| |
Definition at line 193 of file pydl.py.
193 def __init__(self, urlq, tq, dl_site_info, report):
194 Thread.__init__(self)
def __init__(self, urlq, tq, dl_site_info, report)
def pydl.ThreadProc.run |
( |
|
self | ) |
|
Definition at line 200 of file pydl.py.
References pydl.ThreadProc.urlq.
202 url = self.urlq.get()
204 if self.
urlq ==
None:
212 for key, value
in dl_site_info.items():
214 download_path = value[
"download_path"]
216 id_pos = value[
"id_pos"]
219 if( download_path ==
None ):
220 print(
"ERROR: base url of website not configured")
226 o =
ScrapeFile(url, download_path, id_pos, report)
227 report.progressX[o.ofilename] = {
"bytes_so_far": 0,
"total_size": 0}
233 self.urlq.task_done()
235 except urllib.error.HTTPError
as err:
236 print(
"ERROR: %s | HTTPError: %s" % (url, err))
239 except MyError
as err:
240 print(
"\n" +
"** signal caught: %s **\n" % err)
pydl.ThreadProc.dl_site_info |
The documentation for this class was generated from the following file: