(New small feature) 0.4.3 - repeating checking the content
This commit is contained in:
+5
-2
@@ -11,6 +11,9 @@
|
|||||||
New feature: get an anime info from page
|
New feature: get an anime info from page
|
||||||
** 0.3.0 <2022-07-09>
|
** 0.3.0 <2022-07-09>
|
||||||
New feature: send a notification
|
New feature: send a notification
|
||||||
** 0.4.1 <2022-07-09>
|
** 0.4.2 <2022-07-09>
|
||||||
New feature: check for new url or update state
|
New feature: check for a new url and for the updated state
|
||||||
New small feature: add the urls config file
|
New small feature: add the urls config file
|
||||||
|
Little Fix: add update status in quotes
|
||||||
|
** 0.4.3 <2022-07-09>
|
||||||
|
New small feature: repeating checking the content.
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
from db import DataBase
|
from db import DataBase
|
||||||
from scraper import Scraper
|
from scraper import Scraper
|
||||||
from notify import Notification
|
from notify import Notification
|
||||||
|
import time
|
||||||
|
|
||||||
def get_urls(file_path):
|
def get_urls(file_path):
|
||||||
"""Read file that containes urls."""
|
"""Read file that containes urls."""
|
||||||
@@ -53,6 +54,8 @@ def main():
|
|||||||
|
|
||||||
# Checks for new urls in file and add as current state
|
# Checks for new urls in file and add as current state
|
||||||
# If one of page has updated then notifing.
|
# If one of page has updated then notifing.
|
||||||
|
# Repeating the checking with the waiting period.
|
||||||
|
while True:
|
||||||
for url in urls:
|
for url in urls:
|
||||||
data = scr.get_anime(url)
|
data = scr.get_anime(url)
|
||||||
if data == None:
|
if data == None:
|
||||||
@@ -62,6 +65,7 @@ def main():
|
|||||||
if r == -1:
|
if r == -1:
|
||||||
n = Notification(title, MESSAGE)
|
n = Notification(title, MESSAGE)
|
||||||
n.send()
|
n.send()
|
||||||
|
time.sleep(WAITING_PERIOD)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user