Skip to content

Commit

Permalink
Update to v3.0.1
Browse files Browse the repository at this point in the history
Fixed single albums return relative urls
  • Loading branch information
elmoiv authored Jul 7, 2020
1 parent 2797de9 commit 97b1cc7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
[![Python version](https://img.shields.io/badge/python-3.x-brightgreen.svg)](https://pypi.org/project/azapi/)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/52bd035af901477a8c7d7aaf043d580f)](https://www.codacy.com/manual/elmoiv/azapi?utm_source=github.com&utm_medium=referral&utm_content=elmoiv/azapi&utm_campaign=Badge_Grade)

A fast and secure API for AZLyrics.com to get lyrics easily :)
A fast and secure api for AZLyrics.com to get lyrics easily :)


## Features
- Get artist's songs list with Album, Year ...etc
- Can get results via **Google*** and **Duckduckgo*** for accurate results.
- Can get results via Google* and Duckduckgo* for accurate results.
- Save lyrics in a .txt file or any format you like.
- Avoid BAN using **proxy**** and multiple user agents.
- Avoid BAN using proxy** and multiple user agents.

## Installation
`azapi` requires Python 3.
Expand Down Expand Up @@ -40,6 +40,9 @@ print(API.getLyrics())
```
## Changelog

### v3.0.1 07-07-2020
* Fixed single albums return relative urls.

### v3.0.0 15-06-2020
* Project re-done from scratch.
* Added the ability to use search engines.
Expand All @@ -65,9 +68,9 @@ Here are a few sample tests:
* [Using search engine with titles](https://github.com/elmoiv/azapi/tree/master/tests/test5.py)
* [Using search engine with mistyped title and artist](https://github.com/elmoiv/azapi/tree/master/tests/test6.py)

***It is adviced not to send too many requests to avoid IP ban by search engines.**
*It is adviced not to send too many requests to avoid IP ban by search engines

****Proxy is set by the user, defult is empty.**
**Proxy is set by the user, defult is empty.

## Contributing
Please contribute! If you want to fix a bug, suggest improvements, or add new features to the project, just [open an issue](https://github.com/elmoiv/azapi/issues) or send me a pull request.
2 changes: 1 addition & 1 deletion azapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
__url__ = 'https://github.com/elmoiv/azapi'
__description__ = 'Get Lyrics from AZLyrics.com like a Boss ~(0_0)~'
__license__ = 'MIT'
__version__ = '3.0.0'
__version__ = '3.0.1'
1 change: 0 additions & 1 deletion azapi/azapi.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import time
from .requester import Requester
from .tools import *

Expand Down
2 changes: 1 addition & 1 deletion azapi/jaro.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ def jaro_distance(s1, s2):
t = t//2

return (match/ len1 + match / len2 +
(match - t + 1) / match)/ 3.0
(match - t + 1) / match)/ 3.0
6 changes: 4 additions & 2 deletions azapi/tools.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import bs4, re
import bs4, re, time
from urllib.parse import quote
from .jaro import jaro_distance

Expand Down Expand Up @@ -131,6 +131,8 @@ def ParseSongs(page):
'year': '',
'album': '',
'type': '',
'url': a['href']
# v3.0.1: fix relative urls -> absolute url
'url': 'http://www.azlyrics.com' + a['href'][2:] \
if a['href'][:2] == '..' else a['href']
}
return songs
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setuptools.setup(
name="azapi",
version="3.0.0",
version="3.0.1",
author="elmoiv",
author_email="[email protected]",
description="Get Lyrics from AZLyrics.com like a Boss ~(0_0)~",
Expand Down

0 comments on commit 97b1cc7

Please sign in to comment.