Last-Order / Minyami

A lovely video downloader for HLS videos
GNU General Public License v3.0
561 stars 37 forks source link

url join failed when path is relative and without `./` and the host has query parameters #71

Closed fireattack closed 3 years ago

fireattack commented 3 years ago

In this particular case, host url is http://eqe003odff.eq.webcdn.stream.ne.jp/www50/eqe003odff/jmc_pub/jmc_pd/00015/92e7d2e1b50646f7b1576b65a8a17bee_crypt/92e7d2e1b50646f7b1576b65a8a17bee_23_cryptmedia.m3u8?__token=WrHTkk+ztKRIAZO80oWOwTGvOqO/uq8xzu+Gt0EcF9iP655SdUnE8zxDkIS476kg0yd8Nf+vlvOv2VLHwbt7JQ0Qi5wLtFfB55dL6c09Esk=jpZT6cVSfO8iTd9o and the part path is 92e7d2e1b50646f7b1576b65a8a17bee_23_crypt_00001.ts.

The join failed because https://github.com/Last-Order/Minyami/blob/d6c9e3bce24b6996e56eb59d2d7a29653a9c500e/src/utils/common.ts#L11-L13 only deals with query parameters when the path starts with ./.

Last-Order commented 3 years ago

其实之前发现了正准备修来着(