oldlaptop / iheart-mplayer Goto Github PK
View Code? Open in Web Editor NEWAutomatically open an iheartradio station in a media player, such as mplayer, VLC, or mpv
License: BSD 2-Clause "Simplified" License
Automatically open an iheartradio station in a media player, such as mplayer, VLC, or mpv
License: BSD 2-Clause "Simplified" License
Hello,
I know this isn't the official iheart radio API, but I can't find any documentation or support for it.
I have a list of iHeartRadio track_id's and would like to obtain the song and artist names for the tracks.
Is there way to obtain pass multiple iHeartRadio track_id's at once through the iheartRadio API?
I'm currently making multiple calls to the API for a single track as shown below:
https://us.api.iheart.com/api/v1/catalog/getTrackByTrackId?trackId=37561435
Thanks a lot for your time.
Can't find Radio Hauraki http://www.iheart.com/live/radio-hauraki-6191/ or
ZM http://www.iheart.com/live/zm-6190/
But have discovered some interesting US stations
Thanks
I use this utility almost daily to listen to radio stations while I work. I hope you're still willing to update the code again.
I'm betting that iheart changed their API in some way again that has caused this problem. Every station I try to play is met with the error "station streams list empty". Looks like that's in parse_iheart_json.py
I'm going to see if I can fix it myself, and if I actually can then I'll submit the fix. But you can probably fix it 10 times faster than I could.
Thanks!
$ ./iheart-url -v 2525
DEBUG: station name: DC101
DEBUG: call letters: WWDC-FM
DEBUG: location: Washington, DC, US
DEBUG: description: Washington DC's Alternative Rock
DEBUG: broadcast format: ROCKALTERNATIVE
INFO: an unknown stream type is present, please run with -v and submit a github issue
INFO: KeyError instance: 'pivot_hls_stream'
DEBUG: full dictionary dump:
DEBUG: {'format': 'ROCKALTERNATIVE', 'fccFacilityId': '8682', 'score': 0.0, 'band': 'FM', 'adswizzZones': {'display-zone': '38037', 'audio-exchange-zone': '38034', 'audio-fill-zone': '38033', 'audio-zone': '38035', 'optimized-audio-fill-zone': '38036'}, 'streams': {'secure_shoutcast_stream': 'https://c8icy.prod.playlists.ihrhls.com/2525_icy', 'pivot_hls_stream': 'https://us.api.iheart.com/api/v3/adswizzhls/redirect.m3u8?url=https%3A%2F%2Fc8.prod.playlists.ihrhls.com%2F2525%2Fplaylist.m3u8&marketId=42', 'shoutcast_stream': 'http://c8icyelb.prod.playlists.ihrhls.com/2525_icy', 'hls_stream': 'http://c8.prod.playlists.ihrhls.com/2525/playlist.m3u8', 'secure_hls_stream': 'https://c8.prod.playlists.ihrhls.com/2525/playlist.m3u8', 'secure_rtmp_stream': 'rtmp://cp20131.live.edgefcs.net/live/Was_DC_WWDC-FM_OR@152720'}, 'id': 2525, 'genres': [{'name': 'Alternative', 'sortIndex': 16, 'primary': True, 'id': 1}], 'rdsPiCode': '1F10', 'responseType': 'LIVE', 'feeds': {'site_id': '2079', 'feed': 'www.iheart.com/live/2525/'}, 'callLetters': 'WWDC-FM', 'isActive': True, 'callLetterAlias': 'WWDC-FM', 'description': "Washington DC's Alternative Rock", 'modified': '1520430666980', 'markets': [{'stateId': 10, 'cityId': 42, 'stateAbbreviation': 'DC', 'country': 'US', 'sortIndex': 5, 'primary': True, 'countryId': 1, 'city': 'Washington', 'marketId': '42', 'origin': True, 'name': 'WASHINGTON-DC'}], 'logo': 'http://i.iheart.com/v3/re/assets/images/2525.png', 'freq': '101.1', 'name': 'DC101', 'social': {'facebook': 'dc101', 'twitter': 'dc101'}, 'website': 'dc101.iheart.com', 'countries': 'US', 'cume': 900700, 'rds': 'WWDC-FM Washington', 'adswizz': {'publisher_id': '8171', 'adswizzHost': 'false', 'enableAdswizzTargeting': 'false'}, 'provider': 'Clear Channel', 'esid': '1804', 'callLetterRoyalty': 'WWDC-FM'}
no://station/found
Every station fails: urllib.error.HTTPError: HTTP Error 500: INTERNAL SERVER ERROR
Getting the following on this station
DEBUG: station name: 93 WIBC
DEBUG: call letters: WIBC-FM
DEBUG: location: Indianapolis, IN, US
DEBUG: description: Indy's News Center 93 WIBC
DEBUG: broadcast format: Prov_Emmis
INFO: an unknown stream type is present, please run with -v and submit a github issue
INFO: KeyError instance: 'flv_stream'
DEBUG: full dictionary dump:
DEBUG: {'id': 6057, 'score': 0.0, 'name': '93 WIBC', 'responseType': 'LIVE', 'description': "Indy's News Center 93 WIBC", 'band': 'FM', 'callLetters': 'WIBC-FM', 'logo': 'http://i.iheart.com/v3/re/assets/images/6057.png', 'freq': '93.1', 'cume': 196000, 'countries': 'US', 'streams': {'shoutcast_stream': '', 'pls_stream': 'http://playerservices.streamtheworld.com/pls/WIBCFMAAC.pls', 'stw_stream': 'http://playerservices.streamtheworld.com/api/livestream?version=1.4&mount=WIBCFMAAC', 'secure_pls_stream': 'https://playerservices.streamtheworld.com/pls/WIBCFMAAC.pls', 'flv_stream': ''}, 'isActive': True, 'modified': '1504729234941', 'markets': [{'name': 'INDIANAPOLIS-IN', 'marketId': '87', 'sortIndex': 8, 'city': 'Indianapolis', 'stateId': 18, 'stateAbbreviation': 'IN', 'cityId': 87, 'country': 'US', 'countryId': 1, 'origin': True, 'primary': True}], 'genres': [{'id': 9, 'name': 'News & Talk', 'sortIndex': 43, 'primary': True}], 'feeds': {'site_id': '0', 'feed': 'www.iheart.com/live/6057/'}, 'format': 'Prov_Emmis', 'provider': 'Emmis', 'rds': '93 WIBC', 'website': 'www.wibc.com', 'social': {}, 'adswizz': {'publisher_id': '0', 'adswizzHost': 'false', 'enableAdswizzTargeting': 'false'}}```
Windows won't have mplayer in $path (or a working which(1)), this probably doesn't work there. Consider adding an option to specify an mplayer binary, and/or detect mplayer binaries where windows puts them.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.