@@ -760,9 +760,11 @@ def sign2(j, r):
760760 self .timestamp = timestamp
761761
762762 def _get_dlink (self , path ):
763+ # use app_id: 778750
764+ # reference: [3个方法解决百度网盘限速](https://www.runningcheese.com/baiduyun)
763765 dlink = ('http://c.pcs.baidu.com/rest/2.0/pcs/file?method=download'
764- '&app_id=250528 &path={}&ver=2.0&clienttype=1' ).format (
765- urllib .quote (path ))
766+ '&app_id={} &path={}&ver=2.0&clienttype=1' ).format (
767+ args . appid , urllib .quote (path ))
766768
767769 dlink = fast_pcs_server (dlink )
768770 return dlink
@@ -956,7 +958,7 @@ def _download_do(infos):
956958
957959 if args .aget_s :
958960 quiet = ' --quiet=true' if args .quiet else ''
959- cmd = 'aget ' \
961+ cmd = 'ag ' \
960962 '"%s" ' \
961963 '-o "%s.tmp" ' \
962964 '-H "User-Agent: %s" ' \
@@ -3109,6 +3111,8 @@ def handle_args(argv):
31093111 type = int , help = 'aget 分段下载数量' )
31103112 p .add_argument ('-k' , '--aget_k' , action = 'store' , default = '200K' , \
31113113 type = str , help = 'aget 分段大小' )
3114+ p .add_argument ('--appid' , action = 'store' , default = '250528' , type = str , \
3115+ help = '设置 app-id. 如果无法下载或下载慢, 尝试设置为 778750' )
31123116 p .add_argument ('-p' , '--play' , action = 'store_true' , help = 'play with mpv' )
31133117 p .add_argument ('-v' , '--view' , action = 'count' , help = 'view details' )
31143118 p .add_argument ('-V' , '--VERIFY' , action = 'store_true' , help = 'verify' )
0 commit comments