2 Commits
Author SHA1 Message Date
Pierre Geeraert 08121fc701 remove Webcal-python/
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 3m55s
2025-12-03 12:10:01 +00:00
Pierre Geeraert 460f18d85a add proxy for the first part and try to develop the second part 2025-12-03 12:08:56 +00:00
5 changed files with 41 additions and 5 deletions
+1
View File
@@ -2,3 +2,4 @@
*/.idea */.idea
venv/* venv/*
*__pycache__* *__pycache__*
Webcal-python/*
+25 -2
View File
@@ -16,6 +16,10 @@ import mimetypes
import ruamel.yaml import ruamel.yaml
import yaml import yaml
from urllib import request as urlrequest from urllib import request as urlrequest
import urlparse
proxy_url = 'http://gluetun-svc.gluetun.svc:8888' proxy_url = 'http://gluetun-svc.gluetun.svc:8888'
proxy = urlrequest.ProxyHandler({ proxy = urlrequest.ProxyHandler({
@@ -44,6 +48,10 @@ def album_form(request):
def album_downloader(name,url,external_galleries): def album_downloader(name,url,external_galleries):
print(name+" "+url+" "+external_galleries) print(name+" "+url+" "+external_galleries)
opener = urlrequest.build_opener(proxy)
urlrequest.install_opener(opener)
req = urlrequest.Request(url) req = urlrequest.Request(url)
urlcurl = urlrequest.urlopen(req).read() urlcurl = urlrequest.urlopen(req).read()
page = requests.get(url) page = requests.get(url)
@@ -65,10 +73,25 @@ def album_downloader(name,url,external_galleries):
print("") print("")
page = requests.get(album) page = requests.get(album)
webpage = html.fromstring(page.content) webpage = html.fromstring(page.content)
print(webpage.xpath("//a[contains(@href,'cdni.pornpics.com/1280/')]/@href"))
images_list = webpage.xpath("//a[contains(@href,'cdni.pornpics.com/1280/')]/@href")
images_downloader(name=name,images_url_list=images_list)
print(images_list)
return 0 return 0
def images_downloader(name,images_url_list);
for imnage_url in images_url_list:
split = urlparse.urlsplit(url)
filename = destination_folder + split.path.split("/")[-1]
print("downloading: "+filename)
opener = urlrequest.build_opener(proxy)
urlrequest.install_opener(opener)
urlrequest.urlretrieve(url, filename )
return 0
def incremental(request): def incremental(request):
return render(request, 'incremental_form.html',{}) return render(request, 'incremental_form.html',{})
@@ -10941,7 +10941,7 @@
<div class="card-body p-4"> <div class="card-body p-4">
<div class="text-center"> <div class="text-center">
<!-- Product name--> <!-- Product name-->
<h5 class="fw-bolder">Popular Item</h5> <h5 class="fw-bolder">Celeb CX ????</h5>
<!-- Product reviews--> <!-- Product reviews-->
<div class="d-flex justify-content-center small text-warning mb-2"> <div class="d-flex justify-content-center small text-warning mb-2">
<div class="bi-star-fill"></div> <div class="bi-star-fill"></div>
@@ -10951,7 +10951,7 @@
<div class="bi-star-fill"></div> <div class="bi-star-fill"></div>
</div> </div>
<!-- Product price--> <!-- Product price-->
$40.00 https://celeb.cx
</div> </div>
</div> </div>
<!-- Product actions--> <!-- Product actions-->
+11
View File
@@ -0,0 +1,11 @@
services:
db:
image: django:local
restart: always
volumes:
- type: bind
target: /code
source: ./django_code
command: python manage.py runserver 0.0.0.0:7000
ports:
- 7000:7000
+2 -1
View File
@@ -12,4 +12,5 @@ watchdog
celery celery
redis redis
lxml lxml
requests requests
urlparse