Remove dead Last.fm tag search

This commit is contained in:
hugovk 2017-10-18 22:31:15 +03:00
parent 58b93c847e
commit f70254b947
2 changed files with 0 additions and 39 deletions

View file

@ -445,12 +445,6 @@ class _Network(object):
return ArtistSearch(artist_name, self)
def search_for_tag(self, tag_name):
"""Searches of a tag by its name. Returns a TagSearch object.
Use get_next_page() to retrieve sequences of results."""
return TagSearch(tag_name, self)
def search_for_track(self, artist_name, track_name):
"""Searches of a track by its name and its artist. Set artist to an
empty string if not available.
@ -2729,27 +2723,6 @@ class ArtistSearch(_Search):
return seq
class TagSearch(_Search):
"""Search for a tag by tag name."""
def __init__(self, tag_name, network):
_Search.__init__(self, "tag", {"tag": tag_name}, network)
def get_next_page(self):
"""Returns the next page of results as a sequence of Tag objects."""
master_node = self._retrieve_next_page()
seq = []
for node in master_node.getElementsByTagName("tag"):
tag = Tag(_extract(node, "name"), self.network)
tag.tag_count = _number(_extract(node, "count"))
seq.append(tag)
return seq
class TrackSearch(_Search):
"""
Search for a track by track title. If you don't want to narrow the results

View file

@ -340,18 +340,6 @@ class TestPyLastNetwork(PyLastTestCase):
self.assertIsInstance(results, list)
self.assertIsInstance(results[0], pylast.Artist)
def test_tag_search(self):
# Arrange
tag = "rock"
# Act
search = self.network.search_for_tag(tag)
results = search.get_next_page()
# Assert
self.assertIsInstance(results, list)
self.assertIsInstance(results[0], pylast.Tag)
def test_track_search(self):
# Arrange
artist = "Nirvana"