streamingcommunity
This commit is contained in:
10
README.md
Normal file
10
README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
### Genera una pagina html con il link aggiornato di streamingcommunity
|
||||
|
||||
Avvia lo script manualmente <br>
|
||||
<code>./update_link.sh</code><br>
|
||||
|
||||
o mettilo in cron <br>
|
||||
<code>0 0 * * * /path/to/update_link.sh</code> <br>
|
||||
|
||||
per generare la pagina <code>index.html</code> contente il link giusto<br>
|
||||
|
||||
82
index.html
Normal file
82
index.html
Normal file
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>StreamingCommunity Link Giusto</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 4wh;
|
||||
border: 10px solid #ccc;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
div {
|
||||
width: 200wj;
|
||||
height: 200wj;
|
||||
background-color: #fbfbfb;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 90%;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
width: 300wj;
|
||||
height: 200wj;
|
||||
}
|
||||
|
||||
|
||||
h1 {
|
||||
font-size: 36px;
|
||||
/* Default size for desktop */
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
h1 {
|
||||
font-size: 18px;
|
||||
/* Size for mobile phones */
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
h3 {
|
||||
font-size: 15px;
|
||||
/* Size for mobile phones */
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="link">
|
||||
<h3>Link aggiornato per Streaming Community:</h3>
|
||||
<h1><a href=https://streamingcommunity.market />streamingcommunity.market</a></h1>
|
||||
<h3>(cambia circa una volta al mese)</h3>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<img style="display:block; margin-left: auto; margin-right: auto" src="./splash.gif">
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="link">
|
||||
<h3>Link aggiornato per Streaming Community:</h3>
|
||||
<h1><a href=https://streamingcommunity.market />streamingcommunity.market</a></hq>
|
||||
<h4>(cambia circa una volta al mese)</h4>
|
||||
</div>
|
||||
|
||||
</center>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
1
script_link.sh
Executable file
1
script_link.sh
Executable file
@@ -0,0 +1 @@
|
||||
giusto=$(curl -L https://www.giardiniblog.it/streamingcommunity-nuovo-link/ | grep -oP '(?<=<strong>).*?(?=</strong></span></p>)' | grep -oP 'https://streamingcommunity.*') ; echo -e "\n$giusto\n"
|
||||
BIN
splash.gif
Normal file
BIN
splash.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 488 KiB |
95
update_link.sh
Executable file
95
update_link.sh
Executable file
@@ -0,0 +1,95 @@
|
||||
#!/bin/bash
|
||||
|
||||
giusto=$(curl -L https://www.giardiniblog.it/streamingcommunity-nuovo-link/ | grep -oP '(?<=<strong>).*?(?=</strong></span></p>)' | grep -oP 'https://streamingcommunity.*')
|
||||
|
||||
formatted="${giusto#*://}"
|
||||
formatted="${formatted%/}"
|
||||
|
||||
cat <<- _EOF > /var/www/html/scommunity/index.html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>StreamingCommunity Link Giusto</title>
|
||||
<style>
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 4wh;
|
||||
border: 10px solid #ccc;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
div {
|
||||
width: 200wj;
|
||||
height: 200wj;
|
||||
background-color: #fbfbfb;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 90%;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
a {
|
||||
width: 300wj;
|
||||
height: 200wj;
|
||||
}
|
||||
|
||||
|
||||
h1 {
|
||||
font-size: 36px;
|
||||
/* Default size */
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
h1 {
|
||||
font-size: 25px;
|
||||
/* Size mobile phones */
|
||||
}
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
h3 {
|
||||
font-size: 15px;
|
||||
/* Size mobile phones */
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="link">
|
||||
<h3>Link aggiornato per Streaming Community:</h3>
|
||||
<h1><a href=https://streamingcommunity.market />streamingcommunity.market</a></h1>
|
||||
<h3>(cambia circa una volta al mese)</h3>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
<a href=$giusto target="_blank">
|
||||
<img style="display:block; margin-left: auto; margin-right: auto" src="./splash.gif">
|
||||
</a>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div class="link">
|
||||
<h3>Link aggiornato per Streaming Community:</h3>
|
||||
<h1><a href=https://streamingcommunity.market />streamingcommunity.market</a></h1>
|
||||
<h3>(cambia circa una volta al mese)</h3>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
|
||||
</center>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
_EOF
|
||||
|
||||
sudo chown -R www-data:www-data /var/www/html/scommunity ; sudo chmod -R 755 /var/www/html/scommunity
|
||||
Reference in New Issue
Block a user