Listen to iHeartRadio

I got this code Matthew Gyurgyik command line mplayer and created a new version for python3.
So few free to listen iHeartRadio from everywhere.
Station Default : 100z New york
#!/usr/bin/python3
import subprocess
import threading
import argparse
import time
import urllib.request as urlRequest
import xml.etree.ElementTree as ET
import os
import datetime
import signal
import sys
class iheartRadio():
def __init__(self):
self.stations=[
('whtz-fm',"New York's Hit Music Station"),
('khks-fm',"Dallas-Ft. Worth's Hit Music"),
('wksc-fm',"Chicago's Hit Music Station"),
('wjmn ',"Boston’s #1 For Hip-Hop and Hit Music")]
self.station = self.stations[0][0]
self.songList = {}
def epilog(self):
epilog = 'Some options : \n'
for radio,desc in self.stations:
epilog += radio + ((7-len(radio))*' ') + ' : ' +desc + '\n'
return epilog
def getXML(self):
data= urlRequest.urlopen('http://p2.'+self.station+'.ccomrcdn.com/player/player_dispatcher.html?section=radio&action=listen_live').read()
self.xml = ET.fromstring(data)
def getSongInfo(self):
self.getXML()
artists=self.xml.findall('ListenLiveInitialize/JustPlayed/song/artist')
titles=self.xml.findall('ListenLiveInitialize/JustPlayed/song/track')
for i in range(len(artists)):
artist = artists[i].attrib['name']
song = titles[i].attrib['track_title']
if not song in self.songList:
self.songList[song] = artist
print(artist + " - " + song)
def startRadio(self):
self.getXML()
rtmpurl='"'+self.xml.find("ListenLiveInitialize/StreamInfo/stream").attrib['primary_location']+'"'
self.proc = subprocess.Popen('mplayer ' + rtmpurl +' -novideo -ao alsa -quiet', stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE , shell=True)
def keepMpalyer(self):
while self.keepPlaying:
self.proc.wait()
if self.keepPlaying:
self.startRadio()
print('Thread joined')
def main(self):
parser = argparse.ArgumentParser(description='Listen iHeart Radio from everywhere.',epilog=self.epilog(),formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument('-r','--radio', dest='radio', type=str,help='Radio String ID')
parser.add_argument('-t','--time', dest='time', type=int,help='Time Stream will Play (in minutes)')
args = parser.parse_args()
if args.radio:
self.radio = args.radio
if args.time:
signal.signal(signal.SIGALRM, self.handler)
signal.alarm(args.time*60)
self.startRadio()
print('Playing ' + self.station)
self.getSongInfo()
self.keepPlaying = True
self.threadKeepingMplayer = threading.Thread(target=self.keepMpalyer,args=(),group=None)
self.threadKeepingMplayer.start()
while True:
self.getSongInfo()
time.sleep(30)
def handler(self, signum, frame):
self.keepPlaying = False
self.proc.kill()
self.threadKeepingMplayer.join()
sys.exit(0)
if __name__ == "__main__":
radio = iheartRadio()
signal.signal(signal.SIGTERM, radio.handler)
signal.signal(signal.SIGINT, radio.handler)
radio.main()

Follow basic troubleshooting found in your user Guide for your phone.
http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
If that doesn't help:
Reset & restore
http://support.apple.com/kb/HT1430
http://support.apple.com/kb/HT1414

Similar Messages

  • I'm listening to iheartradio through safari on my macbook pro, and two seconds into each song it freezes up and won't play

    I'm listening to iheartradio through safari on my macbook pro, and two seconds into each song it freezes up and wont play the rest of the song.

    This is really unfortunate. I'm sorry that nothing works. I was going to mention holding down the power button and doing a force shutdown but you already did that. You might need to take it into the Apple store. I don't know if booting into safe mode would help. You would have to turn off the machine again, hit the start button and hold down the shift key after you hear the tone, but normally you would let go of the shift key when you see the apple logo and spining wheel. Maybe by holding down the shift key after you here the tone will cause the screen to come back on? The other option is to start up from the 'install disk' if your machine came with one. You would insert the disk, then shut down the computer, and hold down the C key right after hitting the start button.
    Here's the link for the safeboot
    http://support.apple.com/kb/HT1564?viewlocale=nl_nl

  • IPhone 3Gs Battery Issues or Not? WunderRadio or IheartRadio

    Does anyone use their Iphone to listen to IHeartRadio or WunderRadio? I like to use it at work to listen to different stations but it makes me wonder if my battery is ok. I have wifi turned off and 3g off so I am using EDGE and I am getting about 4.5 hours usage with 22% battery remaining. Does this seem right or should I hook up my iphone via USB while at work to save battery?
    This is my second 3gs as my first definetly had battery issues.

    well, as for battery consumption, EDGE is much better (12hrs advertised) compared to 3G (5hrs).
    4.5hrs seems not so much, but it could be normal, internet drains the battery pretty heavily. if your phone behaves normal otherwise I wouldn't worry about it

  • Error 5021...what is it?

    I was listening to iheartradio and then all of a sudden it wouldn't play aymore and I got an error box that said "error 5021"
    ??????HELP!????

    Try the following:
    1- Change the USB port the phone is plugged into. Do not plug the phone back in yet.
    2- Reboot the computer then plug the phone in and immediately restart the phone in DFU WHILE CONNECTED to the computer.
    3- Hit restore.

  • Is there any way to be able to listen to the radio when not in a wifi zone?

    MY friend has a Samsung and listens to Heart radio when walking her dogs. The headset acts as the Ariel and I have tried everything but cannot get the radio as even with the app it is constantly buffering. As I enjoy the radio I am thinking of switching but will be sad to leave iPhone for this. Any advice??

    There is no radio in the iPhone. You can get a music streaming app and listen to internet radio. Or you can buy a $10 FM radio and carry it in your pocket. Here is the Heart Radio app for the iPhone: http://itunes.apple.com/us/app/iheartradio/id290638154?mt=8

  • How to disable iHeartRadio Auto-Start on an iPhone 4s/iOS7?

    Hello - I have a really annoying problem. It apparently has consistently happened through various iOS upgrades (see also Podcasts and this article) . Not sure why it hasn't been resolved.
    If the iHeartRadio app is open, but I am not listening to it and I take a voice call or use the Voice-to-Text recognition, iHeartRadio will automatically start playing afterwards. This typically happens when headphones or a speaker (dock) are plugged in. However, it has also happened with just the phone by itself.
    It is really annoying and does not seem to serve a purpose. The only workaround I have discovered is 'killing' iHeartRadio so it literally cannot restart.
    Any suggestions on how to fix this? It seems like a bug to me.

    Thanks for your replies everyone. I have contacted iheartradio as well regarding this issue.
    I have updated all apps and have done the back up/restore from iTunes to no avail. I am not familiar with voice command/control in iheartradio.
    Per my earlier post, this has been an issue for Apple before, in previous iOS iterations (in particular, Podcasts).
    I have searched high and low for an answer which is why I posted here. I will update if I hear from iheartradio. I would be willing to be bed they say it's an Apple issue...

  • Listening Live via Safari

    I can listen live to a radio station on my Windows computer but Safari won't let me do that. Any suggestions. It says to download the stream I have to have iTunes (.m3u file) and I have iTunes. Apple Support didn't have an answer but suggested I come here. I also installed the iHeartradio app but that app doesn't have the station I want.

    usually radio streaming pages and websites use adobe flash to stream the media unfortunately the iPhone does not support adobe flash and never will support adobe flash.. and if its a itunes file the iPhone does not have itunes
    Message was edited by: sn4p2k

  • How do i use my Platronix bluetooth with iPhone 4 to listen to music.

    How do i use my Platronix bluetooth with iPhone4 to listen to music.
    Its a mono bluetooth paired with the phone.
    I dont want to buy a new stereo headset but can i use this same one.

    One way is to sync the contacts from the old iPhone to iCloud. Then when you turn on the new phone and set it up for iCloud and turn on the Contacts in Settings >iCloud, they will come to the new phone. http://www.apple.com/icloud/setup/

  • APEX LISTENER Install troubleshooting

    Hi, I need help.. :-)
    Default Database connection not configured properly
    What I have done:
         ALTER USER APEX_LISTENER ACCOUNT UNLOCK;
         ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
         ALTER USER APEX_REST_PUBLIC_USER ACCOUNT UNLOCK;
         connect APEX_LISTENER/mypasswd1
         connect APEX_PUBLIC_USER/mypasswd2
         connect APEX_REST_PUBLIC_USER/mypasswd1
    Check default.xml
    password: replaced encrypted one with clear text one for APEX_PUBLIC_USER to ensure it is correct
    even tried APEX_LISTENER password just incase
    Is there a simple JDBC test to see if it connects? it is APEX_PUBLIC_USER who is connecting isn't it?
    ======================================================================
    java -jar apex.war
    Feb 22, 2013 12:44:40 PM oracle.dbtools.standalone.Standalone execute
    INFO: NOTE:
    Standalone mode is designed for use in development and test environments. It is not supported for use in production environments.
    Feb 22, 2013 12:44:40 PM oracle.dbtools.standalone.Standalone execute
    INFO: Starting standalone Web Container in: /data/oracle/orawd/product/11.2.0/dbhome_1/apex_listener/apex
    Feb 22, 2013 12:44:41 PM oracle.dbtools.standalone.Deployer deploy
    INFO: Will deploy application path = /data/oracle/orawd/product/11.2.0/dbhome_1/apex_listener/apex/apex/WEB-INF/web.xml
    Feb 22, 2013 12:44:41 PM oracle.dbtools.standalone.Deployer deploy
    INFO: Deployed application path = /data/oracle/orawd/product/11.2.0/dbhome_1/apex_listener/apex/apex/WEB-INF/web.xml
    Feb 22, 2013 12:44:41 PM oracle.dbtools.common.config.file.ConfigurationFolder logConfigFolder
    INFO: Using configuration folder: /data/oracle/orawd/product/11.2.0/dbhome_1/apex_listener/apex
    Default Database connection not configured properly
    Feb 22, 2013 12:44:42 PM oracle.dbtools.rt.web.SCListener contextInitialized
    INFO: Oracle Application Express Listener initialized
    Application Express Listener version : 2.0.0.354.17.06
    Application Express Listener server info: Grizzly/1.9.49
    Feb 22, 2013 12:44:42 PM com.sun.grizzly.Controller logVersion
    INFO: GRIZZLY0001: Starting Grizzly Framework 1.9.49 - 2/22/13 12:44 PM
    Feb 22, 2013 12:44:42 PM oracle.dbtools.standalone.Standalone execute
    INFO: http://localhost:8888/apex started.

    That could be a problem.
    I was answering the question:
    BillC wrote:
    Is there a simple JDBC test to see if it connects? it is APEX_PUBLIC_USER who is connecting isn't it?Yes - APEX_PUBLIC_USER is the connecting user.
    You can use SQLPLUS to make sure you have the correct password.
    After that, it is the SERVER, PORT, SID/SERVICE in the APEX listener you need to confirm.
    You can TNSPING to confirm you have the correct selections for those.
    You can always re-run the java -jar apex.war setup command to all of the basic settings.
    The reason I mention that is because if you modify the settings manually - we need to ask "which file?" because there is the default and the database specific one too.
    Try making a request to the service in standalone mode and you should get a terminal output (the window stays open) with a more detailed error. I would guess there will be an ORA-12514, TNS listener does not currently know of service requested in descriptor or something similar that will give you the "debug" information you are looking for.
    Regards,
    --Tim St.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Problem with logging in to apex application builder listener

    I have problem with my settings and am posting this in hope that someone else out there had similar problem and solved it!
    I am trying to use reverseproxy to access to our db through apex listener.
    It's been all set-up and I can login to the application it self either through proxy or no proxy using the listener.
    But when I try to login to apex application builder I cannot do it through proxy(with no proxy, it works).
    It just refreshes the login page when I click login....
    I tried to upgrade the listener to the latest v1.1(using 1.0.2) but it causes my tomcat to crash...
    So solution i am looking for is how to make logging in work through proxy..
    In the firebug it is showing that below and few other request status as 302 moved temporariry
    http://myserver:8080/testsin/apex/wwv_flow.accept
    Where as with no proxy it is saying Found.....
    Any thoughts??
    Thanks
    Sin K

    Hello Sin K,
    so proxy and Tomcat are located on different machines as well? Is the proxy able to commuicate with the Tomcat on the configured internal ports and is the proxy able to lookup the hostname you configured for the Tomcat?
    For the connector, the proxyName and proxyPort should be the parameters the client uses to call APEX. So if your clients should call via http://proxyserver:8080/testsin/apex the settings would be
    proxyName=proxyserver
    proxyPort=8080Reason for this is that applications (e.g. the APEX Listener) generate there URL references with these parameters.
    But does your proxy actually serve on port 8080? And is that port accessible by clients? Do clients accept cookies from that server?
    In my case, there is only one 302 which redirects to http://host:port/apex/f?p=4500:1000:sessionid which is correct.
    If you look into your first post request in firebug, what's in the request header?
    -Udo

  • Making an iTunes library protected against ripping onto CD, listen only

    Hi there
    we have a security issue with itunes. We are a secure college within an HMP&YOI and we use 16 imacs in two rooms. We have installed the same master music library (currently 8500 tunes)on each machine and all students have access to it under their own account.
    Our problem is this. 1 (How) is it possible to make a library read only, i.e. so it is not burnable onto a CD, for copyright protection. We want the lads to be able to hear the music without being able to 'rip' it to CD.
    2. Is it possible to split the library into two libraries, making the content of one burnable and the content of the second not burnable. This way we can offer them instrumentals and original titles for burning and commercial copyright protected titles for listening only.
    NB None of the content has been downloaded from the itunes store.
    Your help on this matter would be very much appreciated.
    Mark Anderson
    Music dept
    HMP & YOI Ashfield

    Hi Patrick
    Your solution to the problem seemed to be the answer but I now have another problem: not all the macs in the music room can 'see' i.e. share the new intel mac.
    They are all connected via a Belkin switch using ethernet and sharing is enabled in all machines. Some of the iSite white iMacs can be seen by the new intel mac but they cannot 'see' the new intel mac. How can an ethernet connection work only one way ? We are using standard ethernet two way cable. All machines are running 10.5.3 apart from the new mac which is happy running 10.4.11.
    If I could get all the macs in the room to 'see' the new intel machine, then we could run the intel machine as the Master iTunes Library and share it as you suggest 'read-only' to the other machines.
    Has anyone any suggestions as to why this is happening ? Is there something other than turning sharing on in system prefs that one has to do to enable two communication between all machines ?
    Thanks
    Marco

  • How do I use home sharing between my home computer and my work computer so I can listen to the same music both places?

    Hello. I am trying to use my work computer with itunes to listen my my music on my itunes on my computer at home. I have signed into both. My computer at home is off, is there a way to listen to all my music on both computers by using Home Sharing or another means?

    The best way I know is to sign up for iTunes Match.  All your music is stored in the cloud and can be accessed by up to 10 devices.

  • How to configure oracle listener profile for multiple oracle database

    Hi,
    I am going to install solution manager system in the same server of ERP EHP4 on Windows. Both DB are oracle.
    I'd like to know how to configure listener in this kind of envirnmonent.
    a. use two listener and different ports
    b. use same listener but different ports
    c. use same listener and same port
    Which is the correct mothed?
    And, after installation, there seem three set of profiles of listten, one for ERP, one for SLM, and the other for OS?(%windir%system32), which one is functional?
    Please advise.
    Thanks a lot.
    Regards,
    Alex

    Hi,
    standard installation is creating new configs for listener for each instance.
    I would recommend to use one listener per each instance.
    YOU CAN NOT HAVE one port number for two differnet systems!
    If you want to use one listener than you must adapt tnsnames.ora, listener.ora and ensure that both systems will use different port numbers.
    For example PORT= 15<system number>
    Peter

  • Is there a way that iTunes can act as a Radio Alarm Clock? I have found the radio station I enjoy listening to in the iTunes Radio List. Is there anyway iTunes (and my Mac) can be set to come-on and start playing that Radio Station from Sleep mode at spec

    Is there a way that iTunes can act as a Radio Alarm Clock?
    I have found the radio station I enjoy listening to in the iTunes Radio List. Is there anyway iTunes (and my Mac) can be set to come-on from Sleep mode and start playing that Radio Station at specific times of the day?
    Any App or plug-in that does that?
    Many thanks
    Kevin

    Turning your Mac into a clock radio.
    1.  In iTunes create a playlist that contains just the radio station you want to wake up to.
    2.  Export the playlist (as .m3u works well).  Get Info on your playlist file and look at the Open With entry to make sure it points to iTunes, VLC or some other app that will stream your station.
    3.  In iCal create an event entry at the time you want to wake up.
    4.  Right (or Control) click on your wakeup event and select Get Info.
    5.  For "alarm" select Open File.
    6.  Now under Open File there will be a place to add the file to open.  It will probably be some default entry (like iCal).  Click on it will allow you to select "other."  Then use the file dialog to select your playlist file.
    Your Mac will wake you up at the appointed time.  You don't need to keep iCal running.  If you want to put you Mac to sleep for the night then there is one more thing you need to do.  Open System Preferences to Energy Saver and click on the Schedule button.  Check Start up or wake and set the wake up time to slightly before your iCal alarm time.
    Dan

  • Please help me. I have an IBook g4 and I've somehow lost plugins that I need to listen to webcasts etc. I've tried to download them when it signifies to "download appropriate plugin" or whatever it says, and when i hit the button, it says  "no suitable...

    PLEASE, PLEASE HELP ME. I'm a computer ignorant woman and need help. I have an IBOOK G4 and I was trying to fix a problem in IPhoto (which never got fixed) and took some guy's bad advice to reset iphoto or something and now my plug-ins are gone too. Or at least the one(s) that were allowing me to listen to on-line discussions and audio recordings.. Can anyone help me? I have gone to UPDATE SOFTWARE and updated Java but that is all.  It's like I go to a think were there is an audio thing to listen to and there is a picture of a plug in and it says something like "Plug in not available to listen to this" and then gives you an option to download plug-in but when I do, it says something like "No Plug in was found that was useable" or something alone those lines. Then it has a manual plug-in option but when I clicked that, I entered the frustrated crying zone. Can you help?  I will so give you big points!   Thank you!

    THis is all Greek to me, but maybe it answers your questions????  Thank you Ronda.
    ATA Bus:
    MATSHITADVD-R   UJ-845E:
      Model:    MATSHITADVD-R   UJ-845E
      Revision:    DMP2
      Serial Number:   
      Detachable Drive:    No
      Protocol:    ATAPI
      Unit Number:    0
      Socket Type:    Internal
    Built In Sound Card:
      Devices:
    Texas Instruments TAS3004:
      Inputs and Outputs:
      Internal Microphone:
      Controls:    Left, Right
      Playthrough:    No
      PluginID:    TAS
      Headphones:
      Controls:    Mute, Left, Right
      PluginID:    TAS
      Internal Speakers:
      Controls:    Mute, Left, Right
      PluginID:    TAS
      Formats:
    PCM 16:
      Bit Depth:    16
      Bit Width:    16
      Channels:    2
      Mixable:    Yes
      Sample Rates:    32 KHz, 44.1 KHz, 48 KHz
    PCM 24:
      Bit Depth:    24
      Bit Width:    32
      Channels:    2
      Mixable:    Yes
      Sample Rates:    32 KHz, 44.1 KHz, 48 KHz
    DIMM0/BUILT-IN:
      Size:    512 MB
      Type:    Built-in
      Speed:    Built-in
      Status:    OK
    System Power Settings:
      AC Power:
      System Sleep Timer (Minutes):    6
      Disk Sleep Timer (Minutes):    10
      Display Sleep Timer (Minutes):    6
      Dynamic Power Step:    Yes
      Reduce Processor Speed:    No
      Automatic Restart On Power Loss:    No
      Wake On AC Change:    No
      Wake On Clamshell Open:    Yes
      Wake On LAN:    No
      Wake On Modem Ring:    Yes
      Display Sleep Uses Dim:    Yes
      Battery Power:
      System Sleep Timer (Minutes):    9
      Disk Sleep Timer (Minutes):    10
      Display Sleep Timer (Minutes):    9
      Dynamic Power Step:    No
      Reduce Processor Speed:    Yes
      Automatic Restart On Power Loss:    No
      Wake On AC Change:    No
      Wake On Clamshell Open:    Yes
      Wake On Modem Ring:    No
      Display Sleep Uses Dim:    Yes
      Reduce Brightness:    Yes
    Battery Information:
      Battery Installed:    Yes
      First low level warning:    No
      Full Charge Capacity (mAh):    466
      Remaining Capacity (mAh):    466
      Amperage (mA):    0
      Voltage (mV):    16491
      Cycle Count:    247
    AC Charger Information:
      AC Charger (Watts):    50
      Connected:    Yes
      Charging:    No
    Hardware Configuration:
      Clamshell Closed:    No
      UPS Installed:    No

Maybe you are looking for

  • Work Manager 6.1: java.lang.reflect.InvocationTargetException

    Hi all, Please, I need your help with this issue. I installed Work Manager 6.1 over SMP 3.0.3. I added a field to complex table ctCatalogGroup. The field was already contemplated on the backend so I only had to add it in Agentry. It worked fine for a

  • Mac 21.5 won't sleep, comes back on.

    I click sleep on the apple menu, the screen goes black, then about 10 seconds later it wakes up again.  The display stays on, and doesn't go to sleep automatically either.

  • How to use Forms 5 and DevSuite 10g in the same machine

    Hello everybody, I have installed forms 5 and IDS 10g in one machine and both the versions of the forms were working simultaneously. Now I have un-installed both the versions of the forms and re-installed in the same machine. Installation was success

  • How do I setup security policies without Adobe LiveCycle Rights Management?

    Hi Guys, First of all I  want to excuse for my english language skills . We have about 30 Users which are using Adobe Acrobat XI Standard. Our management board defined security policies for PDF files. We exported the security policies  (Edit -> Prefe

  • Disabling a  Filter on user selection

    HI, I have two columns of which one is a flag (y/n) and another is a date . i want the user to see the report containing both these columns filtered on the basis of Flag .i.e. when a user opens that report he should see all the values corresponding o