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

python 爬虫中怎么搜索中文字符?

  •  
  •   lzy4223 · Mar 26, 2014 · 5316 views
    This topic created in 4456 days ago, the information mentioned may be changed or developed.
    正下联系爬虫,例如我要爬zhibo8.com上,有“切尔西”三个子的连接爬下来,我在正则表达式里面可以输入中文吗?
    est
        1
    est  
       Mar 26, 2014   ❤️ 1
    你自己用python代码试一试的源码长度都比你这个问题打的字少。
    linuxer
        2
    linuxer  
       Mar 26, 2014
    噗,百度知道既视感。
    lzy4223
        3
    lzy4223  
    OP
       Mar 26, 2014
    @linuxer
    @est

    在网上一直没看到用中文的例子,以为是不可以,要用什么特别的方法。

    好吧,忽略我把。
    paulw54jrn
        4
    paulw54jrn  
       Mar 26, 2014   ❤️ 1
    根据实战经验是可以的
    raw_next_url = re.findall(u'<span class="zg-gray-normal">下一页</span>',raw_data)
    paulw54jrn
        5
    paulw54jrn  
       Mar 26, 2014   ❤️ 1
    以前爬知乎时候的代码..
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2716 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 02:31 · PVG 10:31 · LAX 19:31 · JFK 22:31
    ♥ Do have faith in what you're doing.