mirror of
https://github.com/KevinMidboe/bulk-downloader-for-reddit.git
synced 2026-01-21 16:45:36 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a3dcd68a3 | ||
|
|
ac323f2abe | ||
|
|
32d26fa956 | ||
|
|
137481cf3e | ||
|
|
9b63c55d3e |
14
script.py
14
script.py
@@ -23,7 +23,7 @@ from src.tools import (GLOBAL, createLogFile, jsonFile, nameCorrector,
|
|||||||
|
|
||||||
__author__ = "Ali Parlakci"
|
__author__ = "Ali Parlakci"
|
||||||
__license__ = "GPL"
|
__license__ = "GPL"
|
||||||
__version__ = "1.6.2.1"
|
__version__ = "1.6.3"
|
||||||
__maintainer__ = "Ali Parlakci"
|
__maintainer__ = "Ali Parlakci"
|
||||||
__email__ = "parlakciali@gmail.com"
|
__email__ = "parlakciali@gmail.com"
|
||||||
|
|
||||||
@@ -569,7 +569,9 @@ def download(submissions):
|
|||||||
print(f" – {submissions[i]['postType'].upper()}",end="",noPrint=True)
|
print(f" – {submissions[i]['postType'].upper()}",end="",noPrint=True)
|
||||||
|
|
||||||
if isPostExists(submissions[i]):
|
if isPostExists(submissions[i]):
|
||||||
print(f"\n{nameCorrector(submissions[i]['postTitle'])}")
|
print(f"\n" \
|
||||||
|
f"{submissions[i]['postSubmitter']}_"
|
||||||
|
f"{nameCorrector(submissions[i]['postTitle'])}")
|
||||||
print("It already exists")
|
print("It already exists")
|
||||||
duplicates += 1
|
duplicates += 1
|
||||||
downloadedCount -= 1
|
downloadedCount -= 1
|
||||||
@@ -642,6 +644,12 @@ def download(submissions):
|
|||||||
print(" Total of {} links downloaded!".format(downloadedCount))
|
print(" Total of {} links downloaded!".format(downloadedCount))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
VanillaPrint(
|
||||||
|
f" Bulk Downloader for Reddit v{__version__}\n" \
|
||||||
|
f" Written by Ali PARLAKCI – parlakciali@gmail.com\n\n" \
|
||||||
|
f" https://github.com/aliparlakci/bulk-downloader-for-reddit/"
|
||||||
|
)
|
||||||
GLOBAL.arguments = parseArguments()
|
GLOBAL.arguments = parseArguments()
|
||||||
|
|
||||||
if GLOBAL.arguments.directory is not None:
|
if GLOBAL.arguments.directory is not None:
|
||||||
@@ -650,6 +658,8 @@ def main():
|
|||||||
GLOBAL.directory = Path(input("download directory: "))
|
GLOBAL.directory = Path(input("download directory: "))
|
||||||
|
|
||||||
print("\n"," ".join(sys.argv),"\n",noPrint=True)
|
print("\n"," ".join(sys.argv),"\n",noPrint=True)
|
||||||
|
print(f"Bulk Downloader for Reddit v{__version__}\n",noPrint=True
|
||||||
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
checkConflicts()
|
checkConflicts()
|
||||||
|
|||||||
@@ -66,8 +66,9 @@ def getFile(fileDir,tempDir,imageURL,indent=0):
|
|||||||
]
|
]
|
||||||
|
|
||||||
opener = urllib.request.build_opener()
|
opener = urllib.request.build_opener()
|
||||||
opener.addheaders = headers
|
if not "imgur" in imageURL:
|
||||||
if not "imgur" in imageURL: urllib.request.install_opener(opener)
|
opener.addheaders = headers
|
||||||
|
urllib.request.install_opener(opener)
|
||||||
|
|
||||||
if not (os.path.isfile(fileDir)):
|
if not (os.path.isfile(fileDir)):
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
|
|||||||
Reference in New Issue
Block a user