Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6648697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:41:09+00:00 2026-05-26T00:41:09+00:00

This been bugging me for quite a few hours. I’ve been searching a lot

  • 0

This been bugging me for quite a few hours. I’ve been searching a lot and I have found a lot of information. The problem is, I’m not that good, I’m actually a beginner to the max. I’d like to achieve this with Python (if it’s possible!). Maybe with JavaScript and PHP also? Let me explain.

I just found this website http://listeningroom.net and it’s great. You can create/join rooms and upload tracks and listen to them together with friends.

I’d like to extract/scrape/get some specific data from a .json file.
This file contains artist, album title, track title and more. I’d like to extract just the artist, album and track title.

http://listeningroom.net/room/chillasfuck/spins.json The .json file Contains the tracks played in the past 24 hours.

I managed to scrape the whole .json file with Python after looking around, (local .json file) with the following probably not so valid code.

   json_data=open('...\spins.json')

   data = json.load(json_data)
   pprint(data)

   json_data.close()

This prints out the following:

   [{u'endTime': u'1317752614105',
   u'id': u'cf37894e8eaf886a0d000000',
   u'length': 492330,
   u'metadata': {u'album': u'Mezzanine',
            u'artist': u'Massive Attack',
            u'bitrate': 128000,
            u'label': u'Virgin',
            u'length': 17494.479054779807,
            u'title': u'Group Four'},

Just a part of the print

1. I’d like to scrape it from an url (the one provided at the top)
2. Just get ‘album’, ‘artist’ and ‘title’
3. Make sure it prints it as simple as possible like this:

Artist
Track title
Album

Artist
Track title
Album

4. If it’s not too much, save it to a .txt file

I hope I could get some help, I really want to create this for myself, so I can check out more music!

Marvin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:41:09+00:00Added an answer on May 26, 2026 at 12:41 am

    Python (after you loaded the json)

    for elem in data:
        print('{artist}\n{title}\n{album}\n'.format(**elem['metadata']))
    

    To save in a file:

    with open('the_file_name.txt','w') as f:
        for elem in data:
            f.write('{artist}\n{title}\n{album}\n\n'.format(**elem['metadata']))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi I have a huge problem that's been bugging me for quite a while,
This has been bugging me for the last few hours now. I am using
This has been bugging me for a while. I have this ircbot that I
This problem has been bugging me since forever. I have an array and in
It's not a programming questions. But this question has been bugging me for awhile.
This is something that's been bugging me for many years: why most online services
This Jquery problem has been bugging me for a while now. I developed a
This is a question that's been bugging me for some time now: In photoshop/GIMP,
This is a question that has been bugging me for a while. I started
This is a strange one that has been bugging me today. Due to the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.