Code Monkey home page Code Monkey logo

tvsongs's Introduction

tvsongs

Find and listen to songs featured in TV shows.

https://travis-ci.org/zvovov/tvsongs.svg?branch=master
Highlights:
  • Find that song you heard in that TV show but couldn't find anywhere.
  • Searching is easy - descriptions are provided for each episode.
  • See songs for a specific season and episode, or see songs in all seasons all episodes in one go.
  • Listen to the song with the YouTube link provided along with it.
  • All song data is collected in real-time, therefore up to date.
  • Runs on Python 3.3+ and Python 2.7+

Requirements

  • The python modules listed in requirements.txt. These will be installed automatically when you install tvsongs:
    • requests
  • A working Internet connection
  • Name of a TV show. ;)

Installation

$ pip install tvsongs

Usage

$ tvsongs
 Name of the Show: daredevil

 Searching...

 Daredevil
 Total Seasons: 2

 Season 1    Episode(s): 13    Aired: Apr 2015 to Apr 2015
 Song(s): 26

 Season 2    Episode(s): 13    Aired: Mar 2016 to Mar 2016
 Song(s): 17

 Total Song(s) in Daredevil: 43

 Choose Season of Daredevil. 1 to 2 (0 for all): 0
 ...

All the songs will be listed now.

For quick help:

$ tvsongs help

NOTE: If you're using python 2.7.9 or lower, you may see SNIMissingWarning or InsecurePlatformWarning while using tvsongs. In that case, do this:

pip install 'requests[security]'

Support

If you encounter any bugs, then please let me know here.

License

The MIT License (MIT)

Copyright (c) 2016 Chirag Khatri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

tvsongs's People

Contributors

ericheredia avatar zvovov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tvsongs's Issues

KeyError

File "tvsongs", line 171, in main
_episode_song_count_list[episode_ct] = _episode_json['song_count']
KeyError: 'song_count'

"song_count" needs to be changed to "songs_count"

File "tvsongs", line 172, in main
_episode_description = _episode_json['episode_description']
KeyError: 'song_count'

"episode_description" needs to be changed to "description"

Error on Python 3.8

This is what I see when I try searching on python3.8 (on MacOS)

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/tvsongs", line 317, in
main()
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/tvsongs", line 111, in main
_json = hitUrl(_base_url, _input_name)
File "/Library/Frameworks/Python.framework/Versions/3.8/bin/tvsongs", line 41, in hitUrl
return json.loads(js)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)

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.