Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python script batch download and batch rename
Hello everyone,

I have a notepad file with a batch of URLs can somebody tell me how a python script can get the URLs and download them at once, also down of each URL the file name exists so once it is downloaded the file gets automatically rename, and this process must be down for 100 URLs?

This is the concept please help. thanks Smile
you can use requests.get
Thanks, can you send me a simple because I am very new with Python,

Thanks in advance
(Oct-11-2018, 10:26 AM)jkhaksaar Wrote: Thanks, can you send me a simple because I am very new with Python,
You have to show some effort,we do not write finish solution,but try to help along the way.
Can give you some hint to get started.
Read url from a text file:
import requests

with open('url.txt') as f:
    for url_adress in f:
Download example:
import requests

link = 'some url adress'
file_name = 'a_url.pdf'
with open(file_name, 'wb')as f_out:
Rename example in this post

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Run Python Script From My VPS? digitalmatic7 1 25 Yesterday, 10:09 PM
Last Post: metulburr
  running python script from shell invoked with os.system("x-terminal-emulator -e /bin/ markhaus 1 28 Yesterday, 09:56 PM
Last Post: Larz60+
  Executing python script from SQL Server agent job getting error msavoy 1 83 Feb-15-2019, 08:37 PM
Last Post: Larz60+
  Download article without photo caption Helene_python 2 85 Feb-14-2019, 01:13 PM
Last Post: snippsat
  Download multiple large json files at once halcynthis 0 42 Feb-14-2019, 08:41 AM
Last Post: halcynthis
  Import Library but Download first? OscarBoots 15 508 Feb-07-2019, 03:07 AM
Last Post: snippsat
  Download data from webpage after POST request AlDe 0 64 Feb-02-2019, 06:26 AM
Last Post: AlDe
  run setup.exe from python script with special parameters asheru93 0 72 Feb-01-2019, 03:11 PM
Last Post: asheru93
  How to rename Network Interface name aniyanetworks 7 173 Jan-30-2019, 06:12 PM
Last Post: aniyanetworks
  Integrating Python Script for Android App everythingisenergy 0 75 Jan-15-2019, 07:39 PM
Last Post: everythingisenergy

Forum Jump:

Users browsing this thread: 1 Guest(s)