def add_download_task(self, source_url, remote_path, selected_idx=(), **kwargs):
if source_url.startswith('<STR_LIT>'):<EOL><INDENT>print('<STR_LIT>' % source_url)<EOL>return self.add_magnet_task(source_url, remote_path, selected_idx, **kwargs)<EOL><DEDENT>elif source_url.endswith('<STR_LIT>'):<EOL><INDENT>print('<STR_LIT>' % source_url)<EOL>return self.add_torrent_task(source_url, remote_path, selected_idx, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>' % source_url)<EOL>data = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': source_url,<EOL>'<STR_LIT>': remote_path,<EOL>}<EOL>url = '<STR_LIT>'.format(BAIDUPAN_SERVER)<EOL>return self._request('<STR_LIT>', '<STR_LIT>', url=url,<EOL>data=data, **kwargs)<EOL><DEDENT>
:param source_url: 离线下载目标的URL
:param remote_path: 欲保存到百度网盘的目录, 注意以 / 打头
:param selected_idx: 在 BT 或者磁力链的下载类型中, 选择哪些idx下载, 不填写为全部
添加离线任务，支持所有百度网盘支持的类型