/slurp

A Selenium project for fun: Slurp is a hobby project that I created to have some fun with selenium and use my browser automation skills to download some pages from a comic website and create PDFs out of it. Although for fun, this contains a lot of best practices, that can be used to create actual production grade browser automation frameworks!

Primary LanguageJava

Slurp

GitHub Workflow Status GitHub contributors GitHub last commit

Goal:

Objectives

  • Download each jpg page for each comic into its own repository.
  • Convert all jpg's to pdf files for each comic
  • Make this configurable so that if I want to download any super hero comic, I am able to do that (not just for dhruv)

How to use:

download this project on your local machine

Say clone this project from github on your c drive using below commands

cd c:/ git clone https://github.com/PramodKumarYadav/slurp.git

You would need git, jdk 8 and maven 3.8.1

To download all comics from a series.

  • Go to main -> resources -> application.conf file.
  • Change the field series="nagayan" to something of your choice and something whose config is available in the resources directory. Such as say visharpi whose config is available in resources; say series="nagayan" visharpi.conf
  • Now go to test -> java -> slurp -> TestSeries and run test getAllComicsFromASeriesAsPDFs.
  • This will download all comics into the directory ./comics/visharpi/ as pdfs and images. downloaded images

To download a single comic from a series.

  • Go to main -> resources -> application.conf file.
  • Change the field series="visharpi" to something of your choice and something whose config is available in the resources directory. Such as say nagayan whose config is available in resources; say series="nagayan" nagayan.conf
  • Now go to this chosen series config file -> main -> resources -> nagayan.conf.
  • Change the field singleComicUrl="whatever url is here..." to something of your choice from the same series. Something like this (taken from ther series page below): https://comicsworld.in/manga/read-complete-nagayan-series/7-samarkaand-nagayan/
  • Now go to test -> java -> slurp -> TestComics and run test getASingleComicAsPDF.
  • This will download the comic whose URL you put in that series config into the directory, say ./comics/nagayan/ as pdfs and images. downloaded images