[GH-ISSUE #1] Only download the information for first 30 songs for a playlist. #59

Closed
opened 2026-03-13 22:57:00 +03:00 by kerem · 1 comment
Owner

Originally created by @yuhaian on GitHub (Jul 2, 2020).
Original GitHub issue: https://github.com/AliAkhtari78/SpotifyScraper/issues/1

Originally assigned to: @AliAkhtari78 on GitHub.

Describe the bug
get_playlist_url_info() only download first 30 songs (first page?) for a given playlist. My playlist has 192 songs, and this function only downloaded the information for first 30 songs.

To Reproduce
Steps to reproduce the behavior:

from SpotifyScraper.scraper import Scraper, Request
request = Request().request()
s = Scraper(session=request)
url='https://open.spotify.com/playlist/37i9dQZF1DXebGqmpCVcEO?si=DWloNa88RcGyoyaxzfb1Lw'
pl = s.get_playlist_url_info(url=url)
print( len(pl['tracks_list']))   
#  The result here is 30 or 31.
  1. Use the same URL on browser, you can see 50 songs
  2. Scroll down you can see all other songs.

Expected behavior
Expected all 50 songs in pl variable, not first 30.

Screenshots
Not applicable.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: VM
  • OS: Linux ubuntu 4.15.0-106-generic #107~16.04.1-Ubuntu SMP x86_64
  • Browser: Google Chrome Version 83.0.4103.116 (Official Build) (64-bit)
  • Version: Python 3.6.10 :: Anaconda, Inc.

Additional context
None

Originally created by @yuhaian on GitHub (Jul 2, 2020). Original GitHub issue: https://github.com/AliAkhtari78/SpotifyScraper/issues/1 Originally assigned to: @AliAkhtari78 on GitHub. **Describe the bug** get_playlist_url_info() only download first 30 songs (first page?) for a given playlist. My playlist has 192 songs, and this function only downloaded the information for first 30 songs. **To Reproduce** Steps to reproduce the behavior: ``` from SpotifyScraper.scraper import Scraper, Request request = Request().request() s = Scraper(session=request) url='https://open.spotify.com/playlist/37i9dQZF1DXebGqmpCVcEO?si=DWloNa88RcGyoyaxzfb1Lw' pl = s.get_playlist_url_info(url=url) print( len(pl['tracks_list'])) # The result here is 30 or 31. ``` 2. Use the same URL on browser, you can see 50 songs 3. Scroll down you can see all other songs. **Expected behavior** Expected all 50 songs in pl variable, not first 30. **Screenshots** Not applicable. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: VM - OS: Linux ubuntu 4.15.0-106-generic #107~16.04.1-Ubuntu SMP x86_64 - Browser: Google Chrome Version 83.0.4103.116 (Official Build) (64-bit) - Version: Python 3.6.10 :: Anaconda, Inc. **Additional context** None
kerem 2026-03-13 22:57:00 +03:00
Author
Owner

@AliAkhtari78 commented on GitHub (Jul 11, 2020):

@yuhaian Hi.
I am very happy you used my library and I appreciate your feedback base on your experience.

Spotify Scraper uses requests to get web pages and it can load as much as tracks received by requests.

In order to load all tracks of each playlist, the page should be scrolled by a web browser so I have to add a selenium based scraper beside of request based scraper.

It isn't a problem!
It's an additional feature that I can add as a further capability using selenium beside of request to get web pages.

I will release a new version of the library soon,
So you can download and use it.

<!-- gh-comment-id:657045396 --> @AliAkhtari78 commented on GitHub (Jul 11, 2020): @yuhaian Hi. I am very happy you used my library and I appreciate your feedback base on your experience. **Spotify Scraper** uses requests to get web pages and it can load as much as tracks received by **requests**. In order to load all tracks of each playlist, the page should be scrolled by a **web browser** so I have to add a **selenium based scraper** beside of **request based scraper**. It isn't a problem! It's an additional feature that I can add as a further capability using **selenium** beside of **request** to get web pages. I will release a new version of the library soon, So you can download and use it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SpotifyScraper#59
No description provided.