junglescout

所属分类:编程语言基础
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2018-04-03 01:57:57
上 传 者sh-1993
说明:  编程挑战的实施,
(Implementation for Programming Challenge,)

文件列表:
.DS_Store (8196, 2018-04-02)
.babelrc (388, 2018-04-02)
.postcssrc.yml (52, 2018-04-02)
.rspec (22, 2018-04-02)
Gemfile (1922, 2018-04-02)
Gemfile.lock (6463, 2018-04-02)
Rakefile (227, 2018-04-02)
app/ (0, 2018-04-02)
app/assets/ (0, 2018-04-02)
app/assets/config/ (0, 2018-04-02)
app/assets/config/manifest.js (101, 2018-04-02)
app/assets/images/ (0, 2018-04-02)
app/assets/images/.keep (0, 2018-04-02)
app/assets/javascripts/ (0, 2018-04-02)
app/assets/javascripts/application.js (695, 2018-04-02)
app/assets/javascripts/cable.js (360, 2018-04-02)
app/assets/javascripts/channels/ (0, 2018-04-02)
app/assets/javascripts/channels/.keep (0, 2018-04-02)
app/assets/stylesheets/ (0, 2018-04-02)
app/assets/stylesheets/application.css (861, 2018-04-02)
app/channels/ (0, 2018-04-02)
app/channels/application_cable/ (0, 2018-04-02)
app/channels/application_cable/channel.rb (79, 2018-04-02)
app/channels/application_cable/connection.rb (85, 2018-04-02)
app/controllers/ (0, 2018-04-02)
app/controllers/api/ (0, 2018-04-02)
app/controllers/api/v1/ (0, 2018-04-02)
app/controllers/api/v1/.DS_Store (6148, 2018-04-02)
app/controllers/api/v1/info_controller.rb (760, 2018-04-02)
app/controllers/api/v1/reviews_controller.rb (721, 2018-04-02)
app/controllers/application_controller.rb (97, 2018-04-02)
app/controllers/concerns/ (0, 2018-04-02)
app/controllers/concerns/.keep (0, 2018-04-02)
app/controllers/home_controller.rb (84, 2018-04-02)
app/helpers/ (0, 2018-04-02)
app/helpers/application_helper.rb (29, 2018-04-02)
app/javascript/ (0, 2018-04-02)
app/javascript/components/ (0, 2018-04-02)
... ...

# JungleScout Amazon Scraper Hello! It's important we cover a couple things before diving it: I had two choices when it came to getting Amazon product information: * scrape it * amazon advertising api Given the requirements to becoming an Amazon associate, I decided to implement this problem as a scraper. Therefore, the requirements were implemented dealing with the `B002QYW8LW` amazon product from a scraping perspective. ## Overview This is a rails backend that scrapes amazon product and product review pages. If the requested product or page of reviews has already been scraped, it is returned from the database. If not, the product or product reviews are scraped, and then saved. ## System Dependencies * npm * yarn ## Test Suite (Rails) * `bundle exec rspec` will run all the tests *Testing Note* I haven't added any tests that cover the serializers, as I think I would be testing AMS, and not any new functionality introduced by the serializers, as they're pretty simple. Additionally, the controller tests simply assert that the routes return successfully and increase database object counts. The tests covering the services assert that the right information is returned. ## Starting Up * `gem install bundler` * `bundle install` * `./bin/webpack-dev-server` (for webpack) * `rails server` (for rails) ## Services I delegated the actual product / review lookup to a couple service. Each lookup service does the same thing: * finds the product or reviews by ASIN in the db, if they exist * delegate to scraping service to pull in product / review info, if they do not exist * returns the product / reviews ## React Usage Okay, so this is my first time making something with React. I approached things from a "make it work" perspective, and as a result avoided extra libraries if I could (I'm looking at you, Flux!). ## Potential Refactoring * actually pull in Flux * make each react peice its own component * implement Stores * show a list of all products stored in db on load (not in requirements, but I think it would be a good idea)

近期下载者

相关文件


收藏者