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
  How can I make this Python script add a limit to trades made with API? streetlaw 0 55 Oct-12-2018, 11:41 AM
Last Post: streetlaw
  How can read and download the attachment from the mail using while loop in IMAPlib Py Samjith 0 44 Oct-11-2018, 07:15 AM
Last Post: Samjith
  using a shell script within python Krszt 2 85 Oct-10-2018, 11:00 AM
Last Post: snippsat
  download file from google drive .. evilcode1 7 148 Sep-21-2018, 06:13 PM
Last Post: evilcode1
  help about requests download ggbaby 1 83 Sep-18-2018, 03:44 AM
Last Post: wavic
  Download multiple images with one click andie31 0 119 Sep-13-2018, 10:37 AM
Last Post: andie31
  Download multiple images and rename them andie31 4 185 Sep-13-2018, 10:26 AM
Last Post: andie31
  run scapy from python script .. evilcode1 13 291 Sep-13-2018, 01:45 AM
Last Post: ichabod801
  Python script runs on startup but does not register keystrokes. mericanpi 3 170 Sep-07-2018, 02:58 PM
Last Post: mericanpi
  shell script inside python pannis 6 208 Sep-05-2018, 06:05 AM
Last Post: pannis

Forum Jump:

Users browsing this thread: 1 Guest(s)