GithubHelp home page GithubHelp logo

ss-parser's Introduction

SS.COM RSS feed parser

SS.COM Parser is a simple RSS feed parser of the advertising site https://ss.com/ written in Java and Spring Boot. It uses Docker as primary execution environment and Gradle build tool for building application image.

Quickstart

For a quick start, use the following instructions

git clone https://github.com/AlekseyChudov/ss-parser.git
cd ss-parser
./gradlew jibDockerBuild
docker run -it --rm ss-parser:1.12

Congratulations! You have just compiled the SS.COM Parser Java application, packed it into the Docker image and ran the Docker container. You can now lean back and enjoy the logs :)

Configuration

Spring Boot lets you customize configuration in a various ways. To customize Docker application configuration it is convenient to use environment variables. The properties supported by SS.COM Parser and Spring Boot with their default values are shown in application.yml and Appendix A, Common application properties respectively. SS.COM Parser uses Spring Expression Language (SpEL) as filter engine.

Create environment variables file ss-parser.env. To avoid blocking, select the most common user agent. Do not forget to convert the values from yaml or properties format into environment variables format.

HTTP_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

SPRING_MAIL_HOST=smtp.gmail.com
[email protected]
SPRING_MAIL_PASSWORD=secret

SS_PARSER_MAIL_ENABLED=true
[email protected]
[email protected]

SS_PARSER_CAR_ENABLED=true
SS_PARSER_CAR_EXPRESSION=mark == 'Lexus' and year >= 2016

SS_PARSER_FLAT_ENABLED=true
SS_PARSER_FLAT_EXPRESSION=region matches 'Плявниеки|Пурвциемс' and rooms > 3 and area > 100

SS_PARSER_HOME_ENABLED=true
SS_PARSER_HOME_EXPRESSION=region matches 'Дарзциемс|Плявниеки|Пурвциемс|Межциемс' and area > 200 and land > 600

Then run the Docker container with the new configuration file.

docker run -it --rm --env-file ss-parser.env ss-parser:1.12

Once you are satisfied with the filter and configuration, just run the Docker container in the background.

docker run -d --rm --env-file ss-parser.env ss-parser:1.12

If you are not familiar with Docker and containers, there are many tutorials like A Docker Tutorial for Beginners.

ss-parser's People

Contributors

acudovs avatar

Stargazers

Jevgenijs Ratobilskis avatar Girts Rudziss avatar Lev Gorodetskii avatar Pavel avatar  avatar Yuri Grigorov avatar

Watchers

 avatar Pavel avatar Jevgenijs Ratobilskis avatar

Forkers

rk13

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.