Как очистить данные городской диаграммы Spotify? [закрыто]Python

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Как очистить данные городской диаграммы Spotify? [закрыто]

Сообщение Anonymous »


I am trying to get the weekly top songs per city - Barcelona to be precise. However, I couldn't find any Spotify API method to obtain this data, so I am thinking of scrapping its web service.

It is my first time doing web scraping and, although I have read a couple of tutorials, I am not able to create a Python that does the following:

For each week, retrieve the song rank, title, and artist of the songs I got when accessing to [I am trying to get the weekly top songs per city - Barcelona to be precise. However, I couldn't find any Spotify API method to obtain this data, so I am thinking of scrapping its web service.

It is my first time doing web scraping and, although I have read a couple of tutorials, I am not able to create a Python that does the following:

For each week, retrieve the song rank, title, and artist of the songs I got when accessing to URL for 2024-02-29 chart where "2024-02-29" will be dynamically changed to explore the different weeks.

So, the resulting dataset I am interested to have will be similar to:
Week Rank Title Artist 2024-02-29 1 FARDOS JC Reyes, De La Ghetto 2024-02-29 2 Manos Rotas DELLAFUENTE, Morad 2024-02-22 1 Manos Rotas DELLAFUENTE, Morad 2024-02-22 2 LA FALDA Myke Towers

Изображение

Изображение


This is the basic code I have for the moment. But, when printing the response I am not able to see the song information:

import requests import pandas as pd url = 'https://charts.spotify.com/charts/view/ ... 2024-02-29' response = requests.get(url) print(response.text) Response:

[*]Spotify Charts - Spotify Charts are made by fans2024 Spotify AB

Источник: https://stackoverflow.com/questions/781 ... chart-data
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Python»