From 031d423420c2165119f2ca00b876c242d084a3f4 Mon Sep 17 00:00:00 2001 From: yorch Date: Tue, 9 Dec 2014 10:00:35 -0800 Subject: [PATCH] Now it downloads all versions --- python/bbbd.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 python/bbbd.py diff --git a/python/bbbd.py b/python/bbbd.py old mode 100644 new mode 100755 index d41e790..5a3252e --- a/python/bbbd.py +++ b/python/bbbd.py @@ -1,7 +1,8 @@ -import urllib.request,re,getopt +import urllib.request,re,getopt,os +url="http://builder.blender.org/download" + def get_links(**options): - url="http://builder.blender.org/download" ptn='(?<=href\=\")[^\"]*' source=urllib.request.urlopen(url).read().decode("utf-8") links=(re.findall(ptn,source)) @@ -17,4 +18,6 @@ def get_links(**options): links = get_links() for l in links: - print(l) + print(url+os.sep+l,'/Users/makinegx15/Desktop'+os.sep+l) + urllib.request.urlretrieve(url+os.sep+l,'/Users/makinegx15/Desktop'+os.sep+l) + print('downloaded :'+l)