mirror of
https://github.com/house-of-vanity/tracker_watcher.git
synced 2025-07-07 09:54:08 +00:00
move webparts into assets
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
settings.ini
|
settings.ini
|
||||||
.vscode/*
|
.vscode/*
|
||||||
|
assets/*
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
hui
|
||||||
<h1>Rutracker notifyer </h1>
|
<h1>Rutracker notifyer </h1>
|
||||||
<h3>I will notify you when interesting for you topic will be updated.</h3>
|
<h3>I will notify you when interesting for you topic will be updated.</h3>
|
||||||
<form action="add.php" method="post">
|
<form action="add.php" method="post">
|
||||||
@ -14,4 +15,4 @@
|
|||||||
<input type="submit">
|
<input type="submit">
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
9
updater.py
Normal file → Executable file
9
updater.py
Normal file → Executable file
@ -1,4 +1,4 @@
|
|||||||
|
#!/usr/bin/python3
|
||||||
# TODO - config file.
|
# TODO - config file.
|
||||||
import pymysql.cursors
|
import pymysql.cursors
|
||||||
import urllib.request, json
|
import urllib.request, json
|
||||||
@ -9,18 +9,19 @@ from urllib.parse import urlencode
|
|||||||
|
|
||||||
|
|
||||||
parser = ConfigParser()
|
parser = ConfigParser()
|
||||||
parser.read('settings.ini')
|
parser.read('/home/ab/repos/tracker_watcher/settings.ini')
|
||||||
mysql_user = parser.get('mysql', 'mysql_user')
|
mysql_user = parser.get('mysql', 'mysql_user')
|
||||||
mysql_host = parser.get('mysql', 'mysql_host')
|
mysql_host = parser.get('mysql', 'mysql_host')
|
||||||
mysql_db = parser.get('mysql', 'mysql_db')
|
mysql_db = parser.get('mysql', 'mysql_db')
|
||||||
mysql_pass = parser.get('mysql', 'mysql_pass')
|
mysql_pass = parser.get('mysql', 'mysql_pass')
|
||||||
|
|
||||||
interval = '1 HOUR'
|
#interval = '1 HOUR'
|
||||||
#interval = '1 MINUTE'
|
interval = '20 MINUTE'
|
||||||
# Connect to the database
|
# Connect to the database
|
||||||
connection = pymysql.connect(host=mysql_host,
|
connection = pymysql.connect(host=mysql_host,
|
||||||
user=mysql_user,
|
user=mysql_user,
|
||||||
db=mysql_db,
|
db=mysql_db,
|
||||||
|
passwd=mysql_pass,
|
||||||
cursorclass=pymysql.cursors.DictCursor)
|
cursorclass=pymysql.cursors.DictCursor)
|
||||||
|
|
||||||
# If u_date which already stored older than fresh u_date
|
# If u_date which already stored older than fresh u_date
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
$config = parse_ini_file("../settings.ini");
|
$config = parse_ini_file("../settings.ini");
|
||||||
|
|
||||||
$dbh = new PDO('mysql:host='.$config['mysql_host'].';dbname='.$config['mysql_db'], $config['mysql_user']);
|
$dbh = new PDO(
|
||||||
|
'mysql:host='.$config['mysql_host'].';dbname='.$config['mysql_db'],
|
||||||
|
$config['mysql_user'],
|
||||||
|
$config['mysql_pass']
|
||||||
|
);
|
||||||
|
|
||||||
$request = file_get_contents('php://input');
|
$request = file_get_contents('php://input');
|
||||||
$request = json_decode( $request, TRUE );
|
$request = json_decode( $request, TRUE );
|
||||||
@ -214,4 +218,4 @@ else
|
|||||||
register();
|
register();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user