Compare commits

...

2 Commits

Author SHA1 Message Date
Pulguer Gonzalo bba61942c3 Merge remote-tracking branch 'origin/master' 2022-02-17 17:54:27 -03:00
Pulguer Gonzalo 6159aa46d1 first commit 2021-12-20 03:51:26 -03:00
3 changed files with 44 additions and 0 deletions

2
README.md Normal file
View File

@ -0,0 +1,2 @@
# JKAnimeNotifier
This script scraps the website jkanime.net and checks if the new episode of certain anime is up. If it's up, the script opens the episode on a Firefox tab.

BIN
icon/sup.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

42
main.py Normal file
View File

@ -0,0 +1,42 @@
from bs4 import BeautifulSoup
import notify2
import requests
from requests import get
import time
import webbrowser
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
def isItUp(anime):
on = 0
webp = requests.get('https://jkanime.net/')
soup = BeautifulSoup(webp.text, 'html.parser')
recent_ani = soup.find_all('div', class_ = 'anime__sidebar__comment__item__text')
for div in recent_ani:
if div.h5.text == anime:
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
)
n.show()
link = link + linkObtainer(anime)+'/'+ep+'/'
webbrowser.open(link)
break
else:
time.sleep(300)