npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@durka/down

v1.0.1

Published

文件下载,主要专注视频下载

Readme

@durka/download

文件下载,主要专注视频下载

参考 aria2 项目,以及在 aria2 基础上封装的一个 electron 项目 Motrix

aria2: https://github.com/aria2/aria2 Motrix: https://github.com/agalwood/Motrix youtube-dl: https://github.com/ytdl-org/youtube-dl/ curl: https://reqbin.com/req/c-egazzayq/curl-download-file curl --limit-rate 100k -O [URL]

    protocol = info_dict['protocol']
    if protocol.startswith('m3u8') and info_dict.get('is_live'):
        return FFmpegFD

    if protocol == 'm3u8' and params.get('hls_prefer_native') is True:
        return HlsFD

    if protocol == 'm3u8_native' and params.get('hls_prefer_native') is False:
        return FFmpegFD

    return PROTOCOL_MAP.get(protocol, HttpFD)
    def slow_down(self, start_time, now, byte_counter):
        """Sleep if the download speed is over the rate limit."""
        rate_limit = self.params.get('ratelimit')
        if rate_limit is None or byte_counter == 0:
            return
        if now is None:
            now = time.time()
        elapsed = now - start_time
        if elapsed <= 0.0:
            return
        speed = float(byte_counter) / elapsed
        if speed > rate_limit:
            sleep_time = float(byte_counter) / rate_limit - elapsed
            if sleep_time > 0:
                time.sleep(sleep_time)
  • [ ] 指定 proxy 的 http header

  • [ ] 断点续传进度显示不准确

  • [ ] 断点续传应该检查下已经下载的文件和要下载的文件是不是同一个(尺寸大小,链接是否一致等等)

  • [ ] 下载过程记录耗时

  • [ ] 单任务失败后需要支持重试(分片下载时有可能出现错误“”导致整个任务结束)

  • [ ] m3u8 中的 ts 文件如果加密了要支持解密 https://juejin.cn/post/6887575078293372942#heading-0 https://github.com/Momo707577045/m3u8-downloader

  • 需要指定 referer 才能生效的 m3u8 文件(内部已经默认注入) https://v9.xszav.net/hls/xszavavs/media/videos/h264/118886_SD.mp4/index.m3u8

  • 重定向且加密的 m3u8 文件 http://video.yjf138.com/20180812/6yl0Q2YZ/index.m3u8 http://video.yjf138.com/20180812/6yl0Q2YZ/1500kb/hls/index.m3u8

Installation

Usage

Changelog

Changelog

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT