summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosias <me@josias.dev>2021-07-22 18:51:49 -0700
committerJosias <me@josias.dev>2021-07-22 18:51:49 -0700
commitcc19c182acf119dd6a5a234533aee7b196851773 (patch)
treec16d86b88efa2c19a70c02f73e8c4ad8538c1599
parent25d5f852d28b2510127d5c9b79f377ed3aeeaac3 (diff)
Fix docstrings
-rwxr-xr-xugcli.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/ugcli.py b/ugcli.py
index 428a010..6b078c5 100755
--- a/ugcli.py
+++ b/ugcli.py
@@ -1,5 +1,5 @@
"""
-ug-cli is an unofficial tool for accessing Ultimate Guitar and converting songs into more readable formats
+ugcli is an unofficial tool for accessing Ultimate Guitar and converting songs into more readable formats
"""
import json
@@ -11,19 +11,19 @@ try:
except ImportError:
from bs4 import BeautifulSoup
-"""
-Parses the Ultimate Guitar song webpage and extracts the song text
-"""
def extract_song(text):
+ """
+ Parses the Ultimate Guitar song webpage and extracts the song text
+ """
soup = BeautifulSoup(text, "lxml")
element = soup.find_all("div", {"class": "js-store"})[0]
data = json.loads(element.get("data-content"))
return data["store"]["page"]["data"]["tab_view"]["wiki_tab"]["content"]
-"""
-Parses Ultimate Guitar's song format into plaintext by removing excess syntax
-"""
def parse_song(text):
+ """
+ Parses Ultimate Guitar's song format into plaintext by removing excess syntax
+ """
n = text
n = n.replace("[tab]", "")
n = n.replace("[/tab]", "")