we are now able locally to get all albums and go through all of them and get the images links
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m19s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m19s
This commit is contained in:
@@ -16,7 +16,6 @@ import mimetypes
|
|||||||
import ruamel.yaml
|
import ruamel.yaml
|
||||||
import yaml
|
import yaml
|
||||||
from urllib import request as urlrequest
|
from urllib import request as urlrequest
|
||||||
from urllib import parse as urlparse
|
|
||||||
|
|
||||||
proxy_url = 'http://gluetun-svc.gluetun.svc:8888'
|
proxy_url = 'http://gluetun-svc.gluetun.svc:8888'
|
||||||
proxy = urlrequest.ProxyHandler({
|
proxy = urlrequest.ProxyHandler({
|
||||||
@@ -50,9 +49,23 @@ def album_downloader(name,url,external_galleries):
|
|||||||
page = requests.get(url)
|
page = requests.get(url)
|
||||||
webpage = html.fromstring(page.content)
|
webpage = html.fromstring(page.content)
|
||||||
|
|
||||||
print(webpage.xpath('//a/@href'))
|
#get all URLs from the code source (searching for href tag on the code)
|
||||||
#grep "https://www.pornpics.com/galleries/"
|
#https://stackoverflow.com/questions/21455349/xpath-query-get-attribute-href-from-a-tag
|
||||||
|
|
||||||
|
webpage_all_url = webpage.xpath('//a/@href')
|
||||||
|
|
||||||
|
#search for the href that contains the galleries
|
||||||
|
webpage_all_album_url = webpage.xpath("//a[contains(@href,'pornpics.com/galleries/')]/@href")
|
||||||
|
#print(webpage_all_album_url[3])
|
||||||
|
#print(webpage_all_album_url)
|
||||||
|
|
||||||
|
|
||||||
|
for album in webpage_all_album_url:
|
||||||
|
print("Album "+album)
|
||||||
|
print("")
|
||||||
|
page = requests.get(album)
|
||||||
|
webpage = html.fromstring(page.content)
|
||||||
|
print(webpage.xpath("//a[contains(@href,'cdni.pornpics.com/1280/')]/@href"))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user