Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clowdflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Shakour
clowdflows
Commits
635ce76f
Commit
635ce76f
authored
Jan 29, 2014
by
HippoHoppy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
c2c3dc5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
workflows/big_data/library.py
workflows/big_data/library.py
+15
-6
No files found.
workflows/big_data/library.py
View file @
635ce76f
...
...
@@ -16,17 +16,26 @@ def file_url(input_dict):
url_end
=
urls
[
1
].
split
(
"/"
)
url_base
=
"/"
.
join
(
url_start
[:
-
1
])
s
pli
t_index
=
url_start
[
-
1
].
index
(
"a"
)
file_name
=
url_start
[
-
1
][
0
:
s
pli
t_index
]
s
tar
t_index
=
url_start
[
-
1
].
index
(
"a"
)
file_name
=
url_start
[
-
1
][
0
:
s
tar
t_index
]
url_base
+=
"/"
+
file_name
repeat
=
url_start
[
-
1
][
split_index
:]
finish
=
url_end
[
-
1
][
split_index
:]
start
=
url_start
[
-
1
][
start_index
:]
finish
=
url_end
[
-
1
][
start_index
:]
file_extension
=
""
if
start
.
count
(
"."
)
==
1
and
finish
.
count
(
"."
)
==
1
:
start
,
file_extension
=
start
.
split
(
"."
)
finish
,
_
=
finish
.
split
(
"."
)
file_extension
=
"."
+
file_extension
else
:
raise
Exception
(
"URLs does not have the same pattern."
)
alphabet
=
"abcdefghijklmnopqrstuvwxyz"
product
=
itertools
.
product
(
alphabet
,
repeat
=
len
(
repeat
))
product
=
itertools
.
product
(
alphabet
,
repeat
=
len
(
start
))
urls
=
[]
for
p
in
product
:
urls
.
append
(
url_base
+
""
.
join
(
p
))
urls
.
append
(
url_base
+
""
.
join
(
p
)
+
file_extension
)
if
""
.
join
(
p
)
==
finish
:
break
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment