We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dbef51 commit c05d39eCopy full SHA for c05d39e
test.py
@@ -1,13 +1,16 @@
1
-from queue import Queue
+from Crawler.Page import Page
2
+from Crawler.Image import Image
3
+from Image.Download import Download
4
-def do_stuff(q):
- while not q.empty():
5
- print(q.get())
6
- q.task_done()
+if __name__ == '__main__':
+ page = Page('http://fdfashionltd.com');
7
+ # fetch all the links (anchor) of this website
8
+ links = page.fetch_links();
9
-q = Queue(maxsize=0)
-
10
-for x in range(20):
11
- q.put(x)
12
13
-do_stuff(q)
+ for link in links:
+ # fetch all of the images of a web url
+ img = Image(link);
+ images = img.fetch_links();
14
+ # Download all of the images
15
+ download = Download(links=links)
16
+ download.start()
0 commit comments