V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
shuson
0.21D
V2EX  ›  Python

如果你们也喜欢落网上按期整理的音乐,并且想下载下来,且又懒得写脚本,请。。。

  •  
  •   shuson · Jan 15, 2016 · 2803 views
    This topic created in 3765 days ago, the information mentioned may be changed or developed.

    python 大法好

    爬网页(requests+beautifulsoup) -> 建文件 and 夹(os) -> 下载(requests)

    我只是 lib 的搬运工

    欢迎 new pull request
    落网音乐下载小帮手

    6 replies    2016-01-16 10:41:36 +08:00
    GNiux
        1
    GNiux  
       Jan 15, 2016 via iPhone
    不知用 Bash 脚本可否完成这个任务呢?
    xingso
        2
    xingso  
       Jan 15, 2016
    管它到。。先 star 慢慢下
    shuson
        3
    shuson  
    OP
       Jan 15, 2016
    @GNiux 从理论上来讲,肯定可以,问题是人类进步就靠懒,用 bash 解析 html 可烦人了
    shuson
        4
    shuson  
    OP
       Jan 15, 2016
    @xingso 欢迎成为第一个试用者,我没有在无 proxy 环境测试,不知道能不能工作
    GNiux
        5
    GNiux  
       Jan 15, 2016 via iPhone
    @shuson 是的呢。所以 systemd 大行其道。
    Bash 的话,用 curl?
    shuson
        6
    shuson  
    OP
       Jan 16, 2016   ❤️ 1
    @GNiux 对 curl 可以做到,但是 encoding 是个问题。
    我更新了一下代码,设置了一下 sys default encoding ,还是 python 简单
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1397 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 23:57 · PVG 07:57 · LAX 16:57 · JFK 19:57
    ♥ Do have faith in what you're doing.