美文网首页
2019-04-08 临时笔记

2019-04-08 临时笔记

作者: fanchuang | 来源:发表于2019-04-08 19:10 被阅读0次

    1. bugs and fixing:

    1. pip3 ImportError: cannot import name 'main':
    # sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall
    
    2.Failed to start mongod.service: Unit mongod.service not found
    # 这个服务的名字是 mongodb, 不是mongod
    # sudo service mongodb status[start | stop]
    
    3. mongodb 启动错误:
    # Loaded: masked (Reason: Unit mongodb.service is masked.)
    解决: sudo systemctl unmask mongodb
    参考:https://askubuntu.com/questions/919108/error-unit-mongodb-service-is-masked-when-starting-mongodb
    

    2. 使用 scrapy:

    ### scrapy steps:
    1. startproject         # init
    2. targetSpider.py      # make it run
    3. items.py             # define items
    4. pipeline.py          # store to database
    5. settings.py          # enable pipeline, change user-agent
    
    tools:
    1. chrome extension: css selectorGadget 
    2. pip3 install scrapy-user-agent  
    3. pip3 install scrapy-proxy-pool
    

    相关文章

      网友评论

          本文标题:2019-04-08 临时笔记

          本文链接:https://www.haomeiwen.com/subject/hdnpiqtx.html