removed some stuff
This commit is contained in:
siengrain 2022-02-17 20:59:18 +00:00
parent bba61942c3
commit 8242e2d7ac
1 changed files with 22 additions and 16 deletions

38
main.py
View File

@ -1,42 +1,48 @@
#!/bin/env python3
from bs4 import BeautifulSoup
import notify2
import requests
from requests import get
import time
import webbrowser
import os
import sys
link = 'https://jkanime.net/'
anime = ''
notify2.init('A-notifier')
ep = ''
def linkObtainer(anime):
lonk = anime.replace(' ', '-')
lonk = lonk.replace('(', '')
lonk = lonk.replace(')', '')
lonk = lonk.lower()
return lonk
icon = os.path.join(sys.path[0])
icon = icon +'/icon/sup.ico'
def isItUp(anime):
on = 0
webp = requests.get('https://jkanime.net/')
soup = BeautifulSoup(webp.text, 'html.parser')
ani_list = []
date = []
pos = -1
recent_ani = soup.find_all('div', class_ = 'anime__sidebar__comment__item__text')
for div in recent_ani:
if div.h5.text == anime:
ani_list.append(div.h5.text)
date.append(div.span.text)
for x in ani_list:
if x == anime:
pos = ani_list.index(x)
if pos >= 0:
if date[pos] == """ Hoy
""":
on = 1
return on
while True:
online = isItUp(anime)
if online == 1:
n = notify2.Notification("Hiii" ,
anime + " is up on JKanime",
"/home/siengrain/Stuff/aFlvNot/icon/sup.ico" # Icon name
anime + " is up! :3",
icon
)
n.show()
link = link + linkObtainer(anime)+'/'+ep+'/'
webbrowser.open(link)
break
else:
print('not yet :c')
time.sleep(300)