Giter VIP home page Giter VIP logo

tumblr_crawler's Introduction

升级版:https://github.com/tangrela/ojbk_jiexi


Tumblr解析网站搭建教程

  1. 首先安装Python。linux自带了python,windows请自行下载python。推荐Centos7/Python2.7
  2. 这时候,pip应该可以用了。如果不行,linux请按下面的命令安装pip: wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py
  3. 安装依赖库:pip install -r requirement.txt
  4. 创建数据库:python rebuildDB.py
  5. 运行:gunicorn -w4 -b 0.0.0.0:5000 run:app

然后访问 ip:5000 试试 如果不能访问,看看防火墙是否开了5000端口?


以上都是基本的安装。

如果你需要使用MySQL

修改config.py:注释第六行 --> 第五行开头#去掉,修改userpasswddatabase

配置自启动

  1. 修改supervisord.conf,将directory修改为脚本根目录
  2. echo "supervisord -c 网站根目录/supervisord.conf" >> /etc/rc.d/rc.local
  3. chmod +x /etc/rc.d/rc.local

配置nginx

修改nginx配置文件,添加server

server {
        listen       80;
        server_name t.v4s0.us; #域名
        charset utf-8;

        access_log  /www/wwwlogs/t.v4s0.us.log;

        location / {
        proxy_pass http://127.0.0.1:5000;
        proxy_redirect off;
        proxy_set_header Host $host:80;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
        location /(images|javascript|js|css|flash|media|static)/ {
                root /root/tumblr_clawer/app/static; #目录修改好
                expires 1d;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
   }
   
  }

其他需求请加qq群


示例网站:http://t.3kk.me

tumblr_crawler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tumblr_crawler's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.