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

这个 url 后缀是什么规则生成的?

  •  
  •   youxiao · Jan 2, 2018 · 3208 views
    This topic created in 3082 days ago, the information mentioned may be changed or developed.
    https://chengyu.911cha.com/dWQy.html
    https://chengyu.911cha.com/NTZv.html
    https://chengyu.911cha.com/M2dnYQ==.html

    其中 dWQy、NTZv、M2dnYQ==是什么规则生成的呢?
    base64decode 后的值也看不出来。
    5 replies    2018-01-03 14:18:29 +08:00
    Chappako
        1
    Chappako  
       Jan 2, 2018
    hashids
    youxiao
        2
    youxiao  
    OP
       Jan 2, 2018
    @Chappako 也就是说没办法通过这个 url 找回原始 id 了吧?
    vjnjc
        3
    vjnjc  
       Jan 2, 2018   ❤️ 1
    @youxiao 应该是数据库里面的一条记录,除非你有数据库,不然找不到相互关系
    summerwar
        4
    summerwar  
       Jan 2, 2018
    没有关系,随机的 4 位或者多位字符来做 url 而已,这样子可以让 url 看起来比较短
    xpresslink
        5
    xpresslink  
       Jan 3, 2018
    这个规律肯定是不好找的,或说根本没有规律只是随机生成,和这个成语没有关系,可能是数据库的 id 有对应。
    对应关系也许不是用算法或函数,只是用个关系表.

    很明显这个网站做了静态化, 全部网页都是生成好的. 一个原因是反爬, 另一个就是提高性能.
    你只能按字数分类页, 直接把链接解析出来再爬.
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   6029 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 06:18 · PVG 14:18 · LAX 23:18 · JFK 02:18
    ♥ Do have faith in what you're doing.