diff --git a/django_code/django_code/urls.py b/django_code/django_code/urls.py
index a55cbbc..f67e607 100644
--- a/django_code/django_code/urls.py
+++ b/django_code/django_code/urls.py
@@ -63,9 +63,11 @@ urlpatterns = [
path('stash/', stashview.home),
path('stash/hello/', stashapp.hello),
path('stash/form/', stashapp.form),
- path('stash/fapello/', stashapp.fapello),
+ path('stash/incremental/', stashapp.incremental),
+ path('stash/album/', stashapp.album),
+ path('stash/album-form/', stashapp.album_form, name='submit_form'),
path('stash/submit-form/', stashapp.handle_survey_form, name='submit_form'),
- path('stash/fapello-form/', stashapp.fapello_form, name='submit_form'),
+ path('stash/incremental-form/', stashapp.incremental_form, name='submit_form'),
# path('bookstack/', docker_connection.apps.hello),
diff --git a/django_code/stash_management/apps.py b/django_code/stash_management/apps.py
index 89d40a5..1ac167c 100644
--- a/django_code/stash_management/apps.py
+++ b/django_code/stash_management/apps.py
@@ -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('
Hello stash!
')
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')
diff --git a/django_code/stash_management/templates/album_form.html b/django_code/stash_management/templates/album_form.html
new file mode 100644
index 0000000..466e119
--- /dev/null
+++ b/django_code/stash_management/templates/album_form.html
@@ -0,0 +1,288 @@
+
+
+
+
+
+ Stash form
+
+
+
+
+
+
+
+
+
+
+
+
Stash Form
+
Download form
+
+
+
+
+
+
diff --git a/django_code/stash_management/templates/fapello_form.html b/django_code/stash_management/templates/incremental_form.html
similarity index 98%
rename from django_code/stash_management/templates/fapello_form.html
rename to django_code/stash_management/templates/incremental_form.html
index 796b16e..5d7feff 100644
--- a/django_code/stash_management/templates/fapello_form.html
+++ b/django_code/stash_management/templates/incremental_form.html
@@ -256,10 +256,10 @@
-
fapello Form
+
Incremental Form
Download form
-
@@ -10908,7 +10908,7 @@
@@ -10917,20 +10917,19 @@
Sale
-
+
-
Sale Item
+ Pornpics
- $50.00
- $25.00
+ https://www.pornpics.de/