推荐学习书目
› 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
domino
V2EX  ›  Python

如何过滤特殊文件名

  •  
  •   domino · Jul 29, 2017 · 3586 views
    This topic created in 3401 days ago, the information mentioned may be changed or developed.
    请问如何过滤爬虫爬回来,有特殊符号的标题的数据呢,
    想用标题建立文件夹,
    但有时候会遇特特殊字元无法建立.
    除了用 replace , 还有什么方法呢?
    7 replies  •  2017-07-31 00:30:38 +08:00
    ysc3839
    ysc3839
    Jul 29, 2017
    1
    CRC32 Hash 后作为文件夹名
    yangff
    yangff
    Jul 29, 2017
    2
    base64 一下非扩展名部分?
    j137tt736CExzlfM
    j137tt736CExzlfM
    Jul 29, 2017
    3
    额,没有`fnameescape() ` 么?
    techmoe
    techmoe
    Jul 30, 2017 via Android
    4
    特殊符号转译呗。。还能有啥办法
    domino
    domino
    OP
    Jul 30, 2017
    5
    如果用 md5 还是 crc 当为文件夹名,这样资料多很难识别.
    不知是否可以用排除特殊服号的方式来做?
    刚学 python,不是很熟.
    domino
    domino
    OP
    Jul 31, 2017
    7
    @AnyOfYou
    这篇文章我看过,
    不过这样的做法似乎无法保存中文,日文等文件名
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1286 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 17:24 · PVG 01:24 · LAX 09:24 · JFK 12:24
    ♥ Do have faith in what you're doing.