Python regex not working

前端 未结 2 1857
盖世英雄少女心
盖世英雄少女心 2021-01-04 12:32

I am using the following code:

downloadlink = re.findall(\"http://uploadir.com/u/(.*)\\b\", str(downloadhtml))

However, when I pass it the

2条回答
  •  既然无缘
    2021-01-04 13:18

    >>> import re
    >>> html = '';
    >>> regex = r'http://uploadir.com/u/([^"]+)'
    >>> link = re.findall(regex, html)
    >>> link
    ['bb41c5b3']
    >>> 
    

提交回复
热议问题