This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Backbone of bookscraper

 
Ranch Hand
Posts: 99
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DO NOT REVIEW IT. I PROVIDED BIG CHANGES, SO THIS CODE IS NOT UPDATED

I'm developing my bookscraper to improve myself in coding and I think I have solid structure that I want to be reviewed by more experienced people than me. It is app based on SpringBoot which fetches data from 2 different bookstores. For now it has 3 options of fetching books.

1) Bestsellers

2) Book with given title e.g: You say you want to get book with title "Great boy" and it gives you book from each bookstore with title, price, link to the book

3) Categorized books (currently for 5 categories e.g.: crimes, biogrpahies etc)

I have created ranking for categorized books which takes 15 books from each bookstore, then it counts how many given title was repeated (if for example two, then it is higher in the ranking) and returns it in the map Map<String,Integer> which goes for title and number of occurrences.

I have integration and unit tests. In my test resources I put 3 files for each bookstore which contains .html files for each type of fetching (bestsellers,categorized book,most precise book).

Here is the link to github, because I'm not gonna put all the classes here as there is a lot of them. https://github.com/must1/BookstoreScraper

I added also CI with Travis and SonarCloud.

JsoupConnector (responsible for connecting to the given url)



MerlinUrlProperties (all links are stored in .yml file), same class for second bookstore



MerlinFetchingBookService (fetches data from the net)



CategorizedBookRankingService (responsible for ranking for given category)



CategorizedBookService



MostPreciseBookService



BestsellersService



TESTS

CategorizedBooksRankingServiceTest



MerlinFetchingBookService



BestsellersServiceTest




Those are main classes that I want to be reviewed. Thanks a lot for each suggestion/opinion!

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!