You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BandResult only has properties to extract the data from index 0 to 2 which is sufficient for the most basic query result:
>>> print(metallum.band_search('Iron Maiden'))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom>]
But if other criteria are added, there'll be more information included in other indices and it adds up:
>>> print(metallum.band_search('Iron Maiden', countries='GB')) # Country query results in the location at index 2 instead of the country
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | London, England >]
>>> print(metallum.band_search('Iron Maiden', location='London'))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | London, England >] # Location query adds the location
>>> print(metallum.band_search('Iron Maiden', themes='History')) # Lyrical themes query adds data
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | History, Literature, War, Mythology, Society, Religion>]
>>> print(metallum.band_search('Iron Maiden', label="Parlophone")) # Label query adds data
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | Parlophone>]
Year created from/to both result in extra data containing the year the band was formed in:
>>> print(metallum.band_search('Iron Maiden', year_created_from="1970"))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | 1975>]
>>> print(metallum.band_search('Iron Maiden', year_created_to="1980"))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | 1975>]
>>> print(metallum.band_search('Iron Maiden', year_created_from="1970", year_created_to="1980"))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | 1975>]
Arbitrary combinations are possible:
>>> print(metallum.band_search('Iron Maiden', themes='History', location='London'))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom | London, England | History, Literature, War, Mythology, Society, Religion>]
>>> print(metallum.band_search('Iron Maiden', countries='GB', location='London', themes='History', year_created_from="1970", year_created_to="1980"))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | London, England | History, Literature, War, Mythology, Society, Religion | 1975>]
Other queries don't add/change the basic data:
>>> print(metallum.band_search('Iron Maiden', status="1"))
[<SearchResult: Iron Maiden | Heavy Metal, NWOBHM | United Kingdom>]
To access the data separately I added the following in my local version
but this is fairly ugly and means that the user has to know what kind of information will be included in there, also in case of a country (but not location) query, the country property will return the location.
The text was updated successfully, but these errors were encountered:
…ch parameters
- Added functionality for the song search feature (song_search and SongResult and a change in the link parsing to extract the song ID)
- Added additional search parameters for band_search and album_search such as release formats (there's a pull request for this by @pabe-github), additional notes etc.
- Integrated the "similar artists" feature from @msanlop's fork and pull request, including the README example
- Fixed the requests_cache.core import issue
- "Lyrical themes" has since been renamed to just "Themes"
- Added an other property to band_search results to allow access to additional search result parameters (issue by me Queries resulting in more than just the basic band information lcharlick#7)
Original pull request: lcharlick#17
BandResult only has properties to extract the data from index 0 to 2 which is sufficient for the most basic query result:
But if other criteria are added, there'll be more information included in other indices and it adds up:
Year created from/to both result in extra data containing the year the band was formed in:
Arbitrary combinations are possible:
Other queries don't add/change the basic data:
To access the data separately I added the following in my local version
but this is fairly ugly and means that the user has to know what kind of information will be included in there, also in case of a country (but not location) query, the country property will return the location.
The text was updated successfully, but these errors were encountered: