Code Monkey home page Code Monkey logo

podsearch-py's Introduction

Podcast searcher

Search any podcast in iTunes library

PyPI Version Build Status Code Coverage Code Quality

podsearch finds podcasts via iTunes Search API.

Search parameters:

  • query - search string (name, author etc)
  • country - ISO alpha-2 country code (us, de, fr etc), default: us
  • limit - maximum number or search results, default: 5

Returned attributes for each podcast:

  • id - iTunes ID (e.g., 979020229)
  • name - podcast name (Talk Python To Me)
  • author - author name (Michael Kennedy (@mkennedy))
  • url - Apple Podcasts URL (https://podcasts.apple.com/us/podcast/id979020229)
  • feed - podcast RSS URL (https://talkpython.fm/episodes/rss)
  • category - main category (Technology)
  • image - 600x600px image URL (https://is4-ssl.mzstatic.com/image/.../600x600bb.jpg)
  • country - ISO alpha-3 country code (USA)
  • episode_count - episode count this year (26)

Installation

pip install podsearch

Usage

Search podcasts by query:

>>> import podsearch
>>> podcasts = podsearch.search("python", country="us", limit=10)
>>> podcasts[0].name
'Talk Python To Me'
>>> podcasts[0].author
'Michael Kennedy (@mkennedy)'
>>> podcasts[0].url
'https://podcasts.apple.com/us/podcast/id979020229'

Retrieve podcast by iTunes ID:

>>> import podsearch
>>> podcast = podsearch.get(979020229)
>>> podcast.name
'Talk Python To Me'

Development setup

$ python3 -m venv env
$ . env/bin/activate
$ make deps
$ tox

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Make sure to add or update tests as appropriate.

Use Black for code formatting and Conventional Commits for commit messages.

License

MIT

podsearch-py's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

podsearch-py's Issues

Fails to install dataclasses dependancy when working with python 3.6 and Ubuntu 18

Working on testing integrating podsearch with one of my projects - works fine on windows but on linux I get a ModuleNotFoundError when importing it.

File "/home/jwlodek/ProgrammingWorkspace/demo/venv/lib/python3.6/site-packages/demo/search.py", line 1, in <module>
    import podsearch
  File "/home/jwlodek/ProgrammingWorkspace/demo/venv/lib/python3.6/site-packages/podsearch/__init__.py", line 2, in <module>
    from podsearch.searcher import search  # noqa
  File "/home/jwlodek/ProgrammingWorkspace/demo/venv/lib/python3.6/site-packages/podsearch/searcher.py", line 3, in <module>
    from dataclasses import dataclass
ModuleNotFoundError: No module named 'dataclasses'

Installing the dataclasses package with pip fixes the problem:

(venv) jwlodek@hp-ws1:~/ProgrammingWorkspace/demo$ pip install dataclasses
Collecting dataclasses
  Downloading https://files.pythonhosted.org/packages/fe/ca/75fac5856ab5cfa51bbbcefa250182e50441074fdc3f803f6e76451fab43/dataclasses-0.8-py3-none-any.whl
Installing collected packages: dataclasses
Successfully installed dataclasses-0.8

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.