Code Monkey home page Code Monkey logo

googleplaycrawler's Introduction

Brief Instruction (not tested)

  1. Go to downloaded folder gp

  2. Setup python environment Although lots of packages in requirement.txt are actually not required, I just haven't cleaned up...

pip install -r requirements.txt

Because the reviews are loaded with JS, Selenium and Headless Chrome are required (with the former installed in step 2): https://sites.google.com/a/chromium.org/chromedriver/downloads

Also need to specify the directory in settings.py for variable CHROME_DRIVER_PATH.

  1. Install MongoDB

If don't want to use MongoDB, go to settings.py and find the pipelines setting. Uncomment the JSONpipeline and disable settings relating to MongoDB

ITEM_PIPELINES = {
   # 'gp.pipelines.GoogleplayspiderJSONPipeline': 300,
   'gp.pipelines.GoogleplayspiderMongoDBPipeline': 300,
}

MONGODB_URI = 'mongodb://127.0.0.1:27017'
MONGODB_DATABASE = 'healthmobileapp'

Also need to change the JSON file directory in pipelines.py:

#line 60
self.files = dict([ (name, open('yourDirecotry/' + name + '.json', 'wb')) for name in self.saveTypes]) 
  1. Change app categories

The default program will skip apps that are not 'health' or 'medical'. You can change this in line 73 of the middlewares.py.

  1. Logging files directory

Log files directory is currently specified in middlewares.py. Please update accordingly.

  1. Run the crawler
scrapy crawl gp_crawl

References

  1. Scrapy+Selenium+Headless Chrome的Google Play爬虫
  2. https://www.jianshu.com/p/411b20a5ce55

googleplaycrawler's People

Contributors

di-yuan-88 avatar

Stargazers

Joe avatar

Watchers

 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.