change URL for incremental and add the beginning of the new album downloader
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m9s

This commit is contained in:
pierre geeraert
2025-12-02 22:23:40 +00:00
parent 3d0b87998d
commit 31e72f28b0
5 changed files with 333 additions and 16 deletions
+32 -4
View File
@@ -7,6 +7,8 @@ from django.core.files import File
from kubernetes import client, config
from celery import shared_task
from lxml import html
import requests
import os
import time
import random
@@ -14,6 +16,7 @@ import mimetypes
import ruamel.yaml
import yaml
from urllib import request as urlrequest
from urllib import parse as urlparse
proxy_url = 'http://gluetun-svc.gluetun.svc:8888'
proxy = urlrequest.ProxyHandler({
@@ -27,12 +30,37 @@ def hello(request):
return HttpResponse('<h1>Hello stash!</h1>')
def form(request):
return render(request, 'stash_form.html',{})
def album(request):
return render(request, 'album_form.html',{})
def fapello(request):
return render(request, 'fapello_form.html',{})
def album_form(request):
name = request.GET.get('name')
url = request.GET.get('url')
external_galleries = request.GET.get('external_galleries')
def fapello_form(request):
#stash_folder = "/tmp/stash"
album_downloader(name=name,url=url,external_galleries=external_galleries)
text_generated = "successfully sent to the album downloader"
return HttpResponse(text_generated, content_type="text/plain")
def album_downloader(name,url,external_galleries):
print(name+" "+url+" "+external_galleries)
req = urlrequest.Request(url)
urlcurl = urlrequest.urlopen(req).read()
page = requests.get(url)
webpage = html.fromstring(page.content)
print(webpage.xpath('//a/@href'))
#grep "https://www.pornpics.com/galleries/"
return 0
def incremental(request):
return render(request, 'incremental_form.html',{})
def incremental_form(request):
name = request.GET.get('name')
url = request.GET.get('url')
url_suffix = request.GET.get('url_suffix')