Python Forum
I wan't to Download all .zip Files From A Website (Project AI)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I wan't to Download all .zip Files From A Website (Project AI)
#9
That output looks little messy for me @Larz60+.

@eddywinch82 looked at code i did before here,
it had some fancy stuff like progress bar and itertools.islice to any .zip file range wanted.

A quick test with link in your last post.
from bs4 import BeautifulSoup
import requests

url = 'https://www.flightsim.com/vbfs/fslib.php?searchid=65852160'
base_url = 'https://www.flightsim.com/vbfs'
response = requests.get(url)
soup = BeautifulSoup(response.content, 'lxml')
zip_links = soup.find_all('div', class_="fsc_details")
for link in zip_links:
    print(link.find('a').text)
    print('-------------')
    print(f"{base_url}/{link.find('a').get('href')}")
Output:
paidf042.zip https://www.flightsim.com/vbfs/fslib.php?do=copyright&fid=64358 -------------------------- paidf041.zip https://www.flightsim.com/vbfs/fslib.php?do=copyright&fid=64357 -------------------------- paidf040.zip https://www.flightsim.com/vbfs/fslib.php?do=copyright&fid=64356 -------------------------- paidf039.zip https://www.flightsim.com/vbfs/fslib.php?do=copyright&fid=64355 -------------------------- ........
So the .zip and with dowload link,if had beed logged in could download all .zip for that page.
Og write code that go trough all page(simple page system 2,3,4, ect...) and download.
Reply


Messages In This Thread
RE: I wan't to Download all .zip Files From A Website (Project AI) - by snippsat - Aug-26-2018, 11:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Website scrapping and download santoshrane 3 4,492 Apr-14-2021, 07:22 AM
Last Post: kashcode
  Login and download an exported csv file within a ribbon/button in a website Alekhya 0 2,763 Feb-26-2021, 04:15 PM
Last Post: Alekhya
  Cant Download Images from Unsplash Website firaki12345 1 2,384 Feb-08-2021, 04:15 PM
Last Post: buran
  Download some JPG files and make it a single PDF & share it rompdeck 5 5,855 Jul-31-2020, 01:15 AM
Last Post: Larz60+
  download pdf file from website m_annur2001 1 3,095 Jun-21-2019, 05:03 AM
Last Post: j.crater
  Access my webpage and download files from Python Pedroski55 7 5,869 May-26-2019, 12:08 PM
Last Post: snippsat
  Download all secret links from a map design website fyec 0 2,936 Jul-24-2018, 09:08 PM
Last Post: fyec
  I Want To Download Many Files Of Same File Extension With Either Wget Or Python, eddywinch82 15 14,945 May-20-2018, 06:05 PM
Last Post: eddywinch82

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020