这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions metallum/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
"""Python interface for www.metal-archives.com"""

import requests_cache
from requests_cache import remove_expired_responses

from metallum.consts import CACHE_FILE
from metallum.models.album_types import AlbumTypes
from metallum.operations import album_for_id, band_search, song_search

requests_cache.install_cache(cache_name=CACHE_FILE, expire_after=300)
remove_expired_responses()
requests_cache.delete(expired=True)


if __name__ == "__main__":
Expand Down
3 changes: 3 additions & 0 deletions metallum/models/similar_artists.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ def __init__(self, url, result_handler):
super().__init__(url)
data = self._content

if 'No similar artist has been recommended yet.' in data:
return

links_list = PyQuery(data)("a")
values_list = PyQuery(data)("tr")

Expand Down