Code Monkey home page Code Monkey logo

py-epg's Introduction

py-epg

py-epg is an easy to use, modular, multi-process EPG grabber written in Python.

  • ๐Ÿ“บ Scrapes various TV Program websites and saves programs in XMLTV format.
  • ๐Ÿงฉ Simply extend EpgScraper to grab EPG from your favorite TV site (requires basic Python skills).
  • ๐Ÿค– The framework provides the rest:
    • Beautiful Soup - easily search & extract data from html elements
    • multi-processing
    • config management
    • logging
    • build & write XMLTV (with auto-generated fields, eg 'stop')
    • proxy server support
    • auto http/s retries
    • random fake user_agents
  • ๐Ÿš€ Save time by fetching channels in parallel (caution: use proxy server(s) to avoid getting blacklisted)!
  • ๐Ÿง‘๐Ÿปโ€๐Ÿ’ป Your contributions are welcome! Feel free to create a PR with your tv-site scraper and/or framework improvements.

Usage

  1. Install package:

    $ pip3 install py_epg
  2. Create configuration: py_epg.xml

    • Add all your channels (see sample config).
    • Make sure there is a corresponding site scraper implementation in py_epg/scrapers for each channels ('site' attribute).
  3. Run:

    $ python3 -m py_epg -c </path/to/your/py_epg.xml> -p

    ..or see all supported flags:

    $ python3 -m py_epg -h
    usage: py_epg [-h] [-p [PROGRESS_BAR]] [-q [QUIET]] -c CONFIG
    ...

Development

Your contributions are welcome! Setup your dev environment as described below. VSCode is a great free IDE for python projects. Once you are ready with your cool tv site scraper or framework feature, feel free to open a Pull Request here.

  1. Install poetry:

    curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
  2. Clone repository & install dependencies:

    git clone https://github.com/szab100/py-epg.git && cd py-epg
  3. Configure py_epg.xml

    • Add all your channels (see the sample config xml). Make sure you have a scraper implementation in py_epg/scrapers/ for each channels ('site' attribute).
  4. Run:

    poetry install
    poetry run epg -c py_epg.xml

License

Copyright 2021. Released under the MIT license.

py-epg's People

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.