Merge pull request #203 from ben-xo/develop
Update links to HTTPS; update lang links
This commit is contained in:
commit
3c9b2dfa8e
|
@ -343,7 +343,7 @@ class _Network(object):
|
|||
"""
|
||||
Returns a Scrobbler object used for submitting tracks to the server
|
||||
|
||||
Quote from http://www.last.fm/api/submissions:
|
||||
Quote from https://www.last.fm/api/submissions:
|
||||
========
|
||||
Client identifiers are used to provide a centrally managed database
|
||||
of the client versions, allowing clients to be banned if they are
|
||||
|
@ -382,7 +382,7 @@ class _Network(object):
|
|||
return self.domain_names[domain_language]
|
||||
|
||||
def _get_url(self, domain, url_type):
|
||||
return "http://%s/%s" % (
|
||||
return "https://%s/%s" % (
|
||||
self._get_language_domain(domain), self.urls[url_type])
|
||||
|
||||
def _get_ws_auth(self):
|
||||
|
@ -396,7 +396,7 @@ class _Network(object):
|
|||
Makes sure that web service calls are at least 0.2 seconds apart.
|
||||
"""
|
||||
|
||||
# Delay time in seconds from section 4.4 of http://www.last.fm/api/tos
|
||||
# Delay time in seconds from section 4.4 of https://www.last.fm/api/tos
|
||||
DELAY_TIME = 0.2
|
||||
now = time.time()
|
||||
|
||||
|
@ -890,7 +890,7 @@ class LastFMNetwork(_Network):
|
|||
|
||||
Most read-only webservices only require an api_key and an api_secret, see
|
||||
about obtaining them from:
|
||||
http://www.last.fm/api/account
|
||||
https://www.last.fm/api/account
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
|
@ -899,7 +899,7 @@ class LastFMNetwork(_Network):
|
|||
_Network.__init__(
|
||||
self,
|
||||
name="Last.fm",
|
||||
homepage="http://last.fm",
|
||||
homepage="https://www.last.fm",
|
||||
ws_server=("ws.audioscrobbler.com", "/2.0/"),
|
||||
api_key=api_key,
|
||||
api_secret=api_secret,
|
||||
|
@ -910,17 +910,17 @@ class LastFMNetwork(_Network):
|
|||
token=token,
|
||||
domain_names={
|
||||
DOMAIN_ENGLISH: 'www.last.fm',
|
||||
DOMAIN_GERMAN: 'www.lastfm.de',
|
||||
DOMAIN_SPANISH: 'www.lastfm.es',
|
||||
DOMAIN_FRENCH: 'www.lastfm.fr',
|
||||
DOMAIN_ITALIAN: 'www.lastfm.it',
|
||||
DOMAIN_POLISH: 'www.lastfm.pl',
|
||||
DOMAIN_PORTUGUESE: 'www.lastfm.com.br',
|
||||
DOMAIN_SWEDISH: 'www.lastfm.se',
|
||||
DOMAIN_TURKISH: 'www.lastfm.com.tr',
|
||||
DOMAIN_RUSSIAN: 'www.lastfm.ru',
|
||||
DOMAIN_JAPANESE: 'www.lastfm.jp',
|
||||
DOMAIN_CHINESE: 'cn.last.fm',
|
||||
DOMAIN_GERMAN: 'www.last.fm/de',
|
||||
DOMAIN_SPANISH: 'www.last.fm/es',
|
||||
DOMAIN_FRENCH: 'www.last.fm/fr',
|
||||
DOMAIN_ITALIAN: 'www.last.fm/it',
|
||||
DOMAIN_POLISH: 'www.last.fm/pl',
|
||||
DOMAIN_PORTUGUESE: 'www.last.fm/pt',
|
||||
DOMAIN_SWEDISH: 'www.last.fm/sv',
|
||||
DOMAIN_TURKISH: 'www.last.fm/tr',
|
||||
DOMAIN_RUSSIAN: 'www.last.fm/ru',
|
||||
DOMAIN_JAPANESE: 'www.last.fm/ja',
|
||||
DOMAIN_CHINESE: 'www.last.fm/zh',
|
||||
},
|
||||
urls={
|
||||
"album": "music/%(artist)s/%(album)s",
|
||||
|
@ -966,7 +966,7 @@ def get_lastfm_network(
|
|||
|
||||
Most read-only webservices only require an api_key and an api_secret, see
|
||||
about obtaining them from:
|
||||
http://www.last.fm/api/account
|
||||
https://www.last.fm/api/account
|
||||
"""
|
||||
|
||||
_deprecation_warning("Create a LastFMNetwork object instead")
|
||||
|
@ -997,7 +997,7 @@ class LibreFMNetwork(_Network):
|
|||
_Network.__init__(
|
||||
self,
|
||||
name="Libre.fm",
|
||||
homepage="http://libre.fm",
|
||||
homepage="https://libre.fm",
|
||||
ws_server=("libre.fm", "/2.0/"),
|
||||
api_key=api_key,
|
||||
api_secret=api_secret,
|
||||
|
|
|
@ -1449,7 +1449,7 @@ class TestPyLast(unittest.TestCase):
|
|||
self.assertIsInstance(playcount, int)
|
||||
self.assertGreater(playcount, 1)
|
||||
self.assertEqual(
|
||||
"http://www.last.fm/music/test%2bartist/test%2balbum", url)
|
||||
"https://www.last.fm/music/test%2bartist/test%2balbum", url)
|
||||
|
||||
@handle_lastfm_exceptions
|
||||
def test_track_data(self):
|
||||
|
@ -1472,7 +1472,7 @@ class TestPyLast(unittest.TestCase):
|
|||
self.assertIsInstance(playcount, int)
|
||||
self.assertGreater(playcount, 1)
|
||||
self.assertEqual(
|
||||
"http://www.lastfm.fr/music/test%2bartist/_/test%2btitle", url)
|
||||
"https://www.last.fm/fr/music/test%2bartist/_/test%2btitle", url)
|
||||
|
||||
@handle_lastfm_exceptions
|
||||
def test_tag_top_artists(self):
|
||||
|
@ -1625,7 +1625,7 @@ class TestPyLast(unittest.TestCase):
|
|||
playlist = pylast.Playlist(user, id, self.network)
|
||||
self.assertEqual(
|
||||
playlist.get_url(),
|
||||
"http://www.last.fm/user/kaxior/library/"
|
||||
"https://www.last.fm/user/kaxior/library/"
|
||||
"playlists/67ajb_top_100_classick_rock_songs")
|
||||
|
||||
# Act
|
||||
|
@ -1912,7 +1912,7 @@ class TestPyLast(unittest.TestCase):
|
|||
self.assertEqual("blues", name)
|
||||
self.assertTrue(tag1 == tag1)
|
||||
self.assertTrue(tag1 != tag2)
|
||||
self.assertEqual(url, "http://www.last.fm/tag/blues")
|
||||
self.assertEqual(url, "https://www.last.fm/tag/blues")
|
||||
|
||||
@handle_lastfm_exceptions
|
||||
def test_tags_similar(self):
|
||||
|
@ -1951,7 +1951,7 @@ class TestPyLast(unittest.TestCase):
|
|||
self.assertGreater(playcount, 1)
|
||||
self.assertTrue(artist1 != artist2)
|
||||
self.assertEqual(name.lower(), name_cap.lower())
|
||||
self.assertEqual(url, "http://www.last.fm/music/radiohead")
|
||||
self.assertEqual(url, "https://www.last.fm/music/radiohead")
|
||||
self.assertEqual(mbid, "a74b1b7f-71a5-4011-9441-d0b5e4122711")
|
||||
self.assertIsInstance(streamable, bool)
|
||||
|
||||
|
@ -2007,7 +2007,7 @@ class TestPyLast(unittest.TestCase):
|
|||
self.assertEqual(text, "Italy")
|
||||
self.assertTrue(country1 == country1)
|
||||
self.assertTrue(country1 != country2)
|
||||
self.assertEqual(url, "http://www.last.fm/place/italy")
|
||||
self.assertEqual(url, "https://www.last.fm/place/italy")
|
||||
|
||||
@handle_lastfm_exceptions
|
||||
def test_track_eq_none_is_false(self):
|
||||
|
|
Loading…
Reference in a new issue