Git Product home page Git Product logo

ershou's Introduction

   

###中文说明请看 http://shenxugongzi.github.io/Ershou/

Sites for Ubuntu installation guide here refers to other systems, please refer to

Web.py framework based on the production of this site is divided into two parts, the data crawling and web show. Database using sqlite

Please refer to how to install web.py

 http://webpy.org/install 

Gripping portion

Get a directory folder file is responsible for crawling Information

Before crawling you should install the following dependencies:

 requests, pyquery 

After installing the implementation:

 python Get.py 

You can grab data

The server can use crontab timing crawl, the source file has been written only as follows sh

Get.sh edit the file in the root directory

 vim get.sh 

Modify your path

 python /home/yourfile/get.py 

Then join the crontab

 crontab -e 
 * / 10 * * * * sh /home/yourfile/get.sh 

Can be.

Note: It is recommended to delete the database file to re-crawl.

Show the part

Start the application needs to be installed gunicorn

 pip install gunicorn 

Start the service after installing

 gunicorn -w 8 app: ershou 

After starting the service default port is 8000 by default only allow 127.0.0.1 access is only allowed to access the machine. Debugging when you can add the following parameters

 gunicorn -w 8 0.0.0.0:8000 app: ershou 

So that you can visit any address.

Nginx configuration, the xmiao.org replacement for your own domain name on it.

 
server {
   listen 80; 
   server_name xmiao.org www.xmiao.org; 
   access_log /var/log/nginx/example.log; 

   location / {
       proxy_pass http://127.0.0.1:8000; 

       proxy_set_header Host $ host; 
       proxy_set_header X-Real-IP $ remote_addr; 
       proxy_set_header X-Forwarded-For $ proxy_add_x_forwarded_for; 
   } 
} 

server {
     listen 80; 
     server_name ershou.miaowu.asia; 

     location / {
         rewrite ^ http: //www.xmiao.org$request_uri permanent;? 
     } 
} 

ershou's People

Contributors

shenxugongzi avatar

Watchers

James Cloos avatar burton avatar  avatar

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.