python - 爬虫(淘宝)无输出
迷茫
迷茫 2017-04-17 17:44:28
[Python讨论组]
import requests
from bs4 import BeautifulSoup

res=requests.get('https://s.taobao.com/search?
initiative_id=tbindexz_20160515&ie=utf8&spm=a21bo.50862.201856-taobao-item.2&sourceId=tb.index&search_type=item&ssid=s5-e&commend=all&imgfile=&q=python%E4%B9%A6%E7%B1%8D&suggest=0_5&_input_charset=utf-8&wq=python&suggest_query=python&source=suggest')

soup=BeautifulSoup(res.text,'lxml')

for item in soup.select('.item'):
    print item.select('strong')

为什么这个爬虫我用pycharm跑总是Process finished with exit code 0

没法得到输出,但程序也没什么错?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

全部回复(0)
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号