Open nckswt opened 6 months ago
Describe the bug I was attempting to scrape several songs at once and I noticed some garbage data for one particular song that has no lyrics.
Expected behavior I'd expect None instead of getting garbage data.
None
To Reproduce
from pprint import pprint from lyricsgenius import Genius genius = Genius(token) genius.remove_section_headers = True genius.retries = 5 genius.verbose = True title = "Out & About" artist = "Tommy Boyce & Bobby Hart" result = genius.search_song(title, artist) pprint(result.__dict__)
The result is, for some reason, data from this URL: https://genius.com/Genius-may-2022-singles-release-calendar-annotated
Version info
import lyricsgenius; print(lyricsgenius.__version__)
Describe the bug I was attempting to scrape several songs at once and I noticed some garbage data for one particular song that has no lyrics.
Expected behavior I'd expect
None
instead of getting garbage data.To Reproduce
The result is, for some reason, data from this URL: https://genius.com/Genius-may-2022-singles-release-calendar-annotated
Full output
``` {'_body': {'_type': 'song', 'annotation_count': 1, 'api_path': '/songs/6998157', 'artist_names': 'Genius', 'featured_artists': [], 'full_title': 'May 2022 Singles Release Calendar by\xa0Genius', 'header_image_thumbnail_url': 'https://images.genius.com/5c650f43c87bbc0b7c7956246c30ceaf.300x300x1.png', 'header_image_url': 'https://images.genius.com/5c650f43c87bbc0b7c7956246c30ceaf.999x999x1.png', 'id': 6998157, 'instrumental': False, 'lyrics_owner_id': 498964, 'lyrics_state': 'complete', 'lyrics_updated_at': 1703809679, 'path': '/Genius-may-2022-singles-release-calendar-annotated', 'primary_artist': {'_type': 'artist', 'api_path': '/artists/204611', 'header_image_url': 'https://images.genius.com/822a5f872a1fcfe377695dc0046c6bc6.900x176x1.jpg', 'id': 204611, 'image_url': 'https://images.genius.com/0ca83e3130e1303a7f78ba351e3091cd.1000x1000x1.png', 'index_character': 'g', 'iq': 78600, 'is_meme_verified': True, 'is_verified': True, 'name': 'Genius', 'slug': 'Genius', 'url': 'https://genius.com/artists/Genius'}, 'pyongs_count': None, 'relationships_index_url': 'https://genius.com/Genius-may-2022-singles-release-calendar-sample', 'release_date_components': {'day': None, 'month': 5, 'year': 2022}, 'release_date_for_display': 'May 2022', 'release_date_with_abbreviated_month_for_display': 'May. 2022', 'song_art_image_thumbnail_url': 'https://images.genius.com/5c650f43c87bbc0b7c7956246c30ceaf.300x300x1.png', 'song_art_image_url': 'https://images.genius.com/5c650f43c87bbc0b7c7956246c30ceaf.999x999x1.png', 'stats': {'hot': False, 'pageviews': 25767, 'unreviewed_annotations': 0}, 'title': 'May 2022 Singles Release Calendar', 'title_with_featured': 'May 2022 Singles Release Calendar', 'updated_by_human_at': 1703809679, 'url': 'https://genius.com/Genius-may-2022-singles-release-calendar-annotated'}, '_client':Version info
import lyricsgenius; print(lyricsgenius.__version__)
]: 3.0.1