Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

I am trying to download all images in a specific Directory on a webserver

I am trying to gather all images in a specific Directory on a webserver but without to know what the name of a jpg file is

for example on www.this.id/the/website are 3 jpg files with the name 1.jpg, adkjf.jpg and 5df_df.jpg

How can i search on this specific link for all jpg files and download them on my Computer ?

I want to use Python Selenium but i have no Access to the Folder but i can look at the pictures if i have the name of the jpg files

Which modules do i need to download every single jpg file ? Any examples for me ?

Im new to this sorry if the question sounds stupid


Thanks in Advance
You'd effectively be bruteforcing it, there's no reason to use selenium.
You don't need selenium for that,
you can do something like

Code
import requests
from bs4 import BeautifulSoup

url = 'http://thesite.id/what/ever/'
ext = 'jpg'

def listFD(url, ext=''):
    page = requests.get(url).text
    print(page)
    soup = BeautifulSoup(page, 'html.parser')
    return [url + '/' + node.get('href') for node in soup.find_all('a') if node.get('href').endswith(ext)]

for file in listFD(url, ext):
    print(file)
Dude .


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by JoseCmanXDIIMar 7, 2022 03:37 AM 10 512 Mar 7, 2022 03:37 AM
Last Post: JoseCmanXDII
[C#] by Formula 1Apr 24, 2020 02:50 AM 7 251 Apr 24, 2020 02:50 AM
Last Post: Shadow_Cloud
[C#] by flAmingw0rmSep 30, 2018 03:05 PM 21 1,569 Sep 30, 2018 03:05 PM
Last Post: momo00