Code Monkey home page Code Monkey logo

papers_crawler's Introduction

Crawl paper information from

  1. science direct
  2. mdpi and store into mongodb

Check item.py out for the details of scraped structure.

requirements

  1. docker
  2. python 3.7

run steps

  1. docker pull mongo:4.2.3
  2. docker run -p 27017:27017 -d --name mongo mongo:4.2.3
  3. run either below methods to install dependencies
  • pip install -r requirement.txt
  • pipenv install --python 3.7 then pipenv shell
  1. run crawler, scrapy crawl sciencedirect --loglevel=INFO, where sciencedirect is a spider
  • run scrapy list to display the list of crawlers

visual data

I recommend Robo 3T to query data, otherwise mongo-shell can do

  1. connect to server
  2. db.getCollection('items').find({'abstract': {$ne: null}})

notes

  1. visit https://docs.scrapy.org/en/latest/topics/jobs.html for pause crawl works
  • e.g scrapy crawl sciencedirect -s JOBDIR=crawl_jobs/sciencedirect
  1. should expose file inside docker container to the machine
  • determine a folder first outside, for example: /Users/bryan/papers_crawler/mongodb
  • run docker run -p 27017:27017 -d -v /Users/bryan/workplace/papers_crawler/mongodb:/data/db/ --name mongo mongo:4.2.3

papers_crawler's People

Contributors

dongchirua avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

yeeunny

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.