summaryrefslogtreecommitdiff
path: root/4chan_search/wwwimgpull.py
diff options
context:
space:
mode:
authorgrothedev <grothedev@gmail.com>2021-09-12 13:31:59 -0500
committergrothedev <grothedev@gmail.com>2021-09-12 13:31:59 -0500
commitf3e8b39ac81340129288f1180511bf37f40cba35 (patch)
tree194ea7386a658f88cca9b64e6ce77dd63d399543 /4chan_search/wwwimgpull.py
parent98250e3e97bdee6432385750fcf4aef8f1a61d55 (diff)
fixed some things
Diffstat (limited to '4chan_search/wwwimgpull.py')
-rw-r--r--4chan_search/wwwimgpull.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/4chan_search/wwwimgpull.py b/4chan_search/wwwimgpull.py
index 684447a..35544e8 100644
--- a/4chan_search/wwwimgpull.py
+++ b/4chan_search/wwwimgpull.py
@@ -1,6 +1,7 @@
import requests
from bs4 import BeautifulSoup
import re
+import sys
###
# get images from websites
@@ -28,3 +29,9 @@ def pullImgs(url):
srcURL = img.get('src')
result.append(srcURL)
return result
+
+if len(sys.argv) < 2:
+ sys.exit(0)
+
+for url in pull4chImgs(sys.argv[1]):
+ print(url)