aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-10-14 21:54:05 +0000
committerbloodstalker <thabogre@gmail.com>2018-10-14 21:54:05 +0000
commit7cf84dd9151a253087eee501728f0fdff79a92e1 (patch)
treefc3742c87f1b2a8eae864706008c29521e6270b9
parentupdate (diff)
downloadkaminokumo-7cf84dd9151a253087eee501728f0fdff79a92e1.tar.gz
kaminokumo-7cf84dd9151a253087eee501728f0fdff79a92e1.zip
update
-rwxr-xr-xkaminokumo18
1 files changed, 10 insertions, 8 deletions
diff --git a/kaminokumo b/kaminokumo
index 28557ae..29dcc3c 100755
--- a/kaminokumo
+++ b/kaminokumo
@@ -31,13 +31,15 @@ def mrg(url):
requests.packages.urllib3.disable_warnings()
resp = requests.get(url, verify=False)
soup = BeautifulSoup(resp.text, "lxml")
- #print(resp.text)
res = soup.select("dd")
- length = len(res[7].text.split(","))
+ if url == "https://chaturbate.com/anabellastar":
+ search = res[6].text.split(",")
+ else:
+ search = res[7].text.split(",")
+ length = len(search)
for split in res[7].text.split(","):
if length == 1:
if split.find("minutes") != -1:
- #print("mg")
return True
return False
@@ -48,19 +50,19 @@ def premain(argparser):
signal.signal(signal.SIGINT, SigHandler_SIGINT)
url = json.load(open("/home/bloodstalker/extra/kaminokumo/data.json"))
if mrg(url["1"]):
- print("mg-", end="")
+ print("mg ", end="")
vocalize(os.path.expanduser("~") + "/scripts/mila/mgup.ogg")
if mrg(url["2"]):
- print ("obk-", end="")
+ print ("obk ", end="")
vocalize(os.path.expanduser("~") + "/scripts/mila/obkup.ogg")
if mrg(url["3"]):
- print ("ddd-", end="")
+ print ("ddd ", end="")
vocalize(os.path.expanduser("~") + "/scripts/mila/dddup.ogg")
if mrg(url["4"]):
- print ("red-", end="")
+ print ("red ", end="")
vocalize(os.path.expanduser("~") + "/scripts/mila/annaup.ogg")
if mrg(url["5"]):
- print ("ls-", end="")
+ print ("ls ", end="")
vocalize(os.path.expanduser("~") + "/scripts/mila/lisaup.ogg")
def main():