cmmulxuk
V2EX  ›  Flask

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

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

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

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