[711chan]  -  [WT]  [Home] [Manage]

[Return]
Posting mode: Reply
Name
Email
Subject   (reply to 330)
Message
File
Password  (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG
  • Maximum file size allowed is 1000 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 283 unique user posts. View catalog

  • Blotter updated: 2010-01-06 Show/Hide Show All

we need $20/mo

File 126478987444.jpg - (6.83KB , 202x174 , Garfeild DERP.jpg )
330 No. 330
Halp. Regex in python. I am making a downloader and need help naming the downloaded file. Ex url would be www.abc.def/file.ext. I would like to use a regular expression to get the file name and extension. /*.*^ would work?
Expand all images
>> No. 332
wget
aria2c
^^ both command line usable can be used in scripts.

FDM (Free Download Manager)
^ GUI BEEKEEPING
>> No. 333
File 126498884711.png - (1.69KB , 252x169 , Broken Image.png )
333
>>332
It is actually going to be a function in the program. The program is installed onto the computer and a remote computer can 'help' the user carry out task.
>> No. 343
[^/]+$
>> No. 356
File 12671285518.gif - (31.82KB , 736x736 , AWESOME Skeptisch.gif )
356
>>343
Thank you. This is what up with. If anyone can make it better let me know. This is only the code to download and rename a file+ext.

import urllib, re
flocal = raw_input("File Location: ")
fname = re.compile("[^/]+$", re.IGNORECASE).search(flocal).group()
urllib.urlretrieve (flocal, fname)
>> No. 361
tip 1: stop using python.
>> No. 362
File 126740835735.jpg - (381.26KB , 2048x1536 , oobR8.jpg )
362
>>361
What would you suggest. I know no other languages, for the mere fact that I have no need to program other than my malice. So far all the RATs I've done in python have been gone undected for well over a year now.

I am open to your suggestion though. What would you reccomend?


Delete post []
Password  
Report post
Reason