cmmulxuk
V2EX  ›  Flask

flask get 如何获取复杂点的网址啊?

  •  
  •   cmmulxuk · Dec 5, 2015 · 3814 views
    This topic created in 4001 days ago, the information mentioned may be changed or developed.
    url = http://example.com/abc?id=123456&name=ok

    像上面这种网址, flask get 无法获取啊

    用 path 的话,只能获取到域名。
    cmmulxuk
    cmmulxuk
    OP
    Dec 5, 2015
    1
    忘记交代了,上面的 URL 是作为参数传递的。
    mkeith
    mkeith
    Dec 5, 2015
    2
    urlencode
    jimzhong
    jimzhong
    Dec 6, 2015
    3
    urllib.parse 可以解决
    flask 还有一个 request.args 可以用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4452 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 07:03 · PVG 15:03 · LAX 23:03 · JFK 02:03
    ♥ Do have faith in what you're doing.