mirror of
https://github.com/ClaytonWWilson/Scraper-for-theTVDB.com.git
synced 2025-12-15 17:28:46 +00:00
Made a few small edits
This commit is contained in:
parent
c129cbd417
commit
9aab258350
@ -98,8 +98,6 @@ def searchImages(idNum, keyType, authHeaders): # This is getting a list of file
|
|||||||
quit()
|
quit()
|
||||||
|
|
||||||
def downloadImages(imageType, respObj, idNum): # TODO some images arent grabbed through the api. save the image number and make a try catch to get any missing images
|
def downloadImages(imageType, respObj, idNum): # TODO some images arent grabbed through the api. save the image number and make a try catch to get any missing images
|
||||||
clearFolders()
|
|
||||||
|
|
||||||
parsed_respObj = json.loads(respObj.content)
|
parsed_respObj = json.loads(respObj.content)
|
||||||
|
|
||||||
saveNameList = download(imageType, parsed_respObj)
|
saveNameList = download(imageType, parsed_respObj)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import urllib.parse
|
|||||||
from actions import wait
|
from actions import wait
|
||||||
|
|
||||||
|
|
||||||
|
# TODO Move this to actions
|
||||||
def searchRemainder(imageType, saveNameList, idNum):#Finds any images missing from the api call in getImages
|
def searchRemainder(imageType, saveNameList, idNum):#Finds any images missing from the api call in getImages
|
||||||
numbers = []
|
numbers = []
|
||||||
print("Checking for missing images...") # TODO implement this method
|
print("Checking for missing images...") # TODO implement this method
|
||||||
@ -135,6 +135,7 @@ def search():
|
|||||||
poster = searchImages(idNum, POS_KEY_TYPE, authHeaders)
|
poster = searchImages(idNum, POS_KEY_TYPE, authHeaders)
|
||||||
banner = searchImages(idNum, BAN_KEY_TYPE, authHeaders)
|
banner = searchImages(idNum, BAN_KEY_TYPE, authHeaders)
|
||||||
|
|
||||||
|
clearFolders()
|
||||||
downloadImages("fanart", fanart, idNum) # TODO find a better way to pass these variables. Constructor?
|
downloadImages("fanart", fanart, idNum) # TODO find a better way to pass these variables. Constructor?
|
||||||
downloadImages("poster", poster, idNum)
|
downloadImages("poster", poster, idNum)
|
||||||
downloadImages("banner", banner, idNum)
|
downloadImages("banner", banner, idNum)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user