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