mikage-emu / saveShop

Let's save the 3DS and Wii U eShop!
90 stars 2 forks source link

Missing image from news #6

Closed www2000 closed 1 year ago

www2000 commented 1 year ago

Hi i found out that the image from the the news file is not downloading. Last night i have create a fix in my python3 for do this. run my scrip and after compleet my scrip use wget to download the files from nintendo server using this command: wget --no-check-certificate -i ./dlist.txt

`from xml.dom import minidom from os import listdir from pathlib import Path

class GetNewsImg(object): """docstring for GetNewsImg.""" def init(self): super(GetNewsImg, self).init() self.dlList = [] self.DirWalk() self.writedlfile()

def DirWalk(self):
    p = Path("samurai")
    for i in p.iterdir():
        for y in i.iterdir():
            print(y)
            if y.is_dir():
                n = y / "news"
                print(n)
                #if n.is_file():
                self.parseNews(str(n))

def parseNews(self,n):
    doc = minidom.parse(n)
    url = name = doc.getElementsByTagName("image")
    for i in url:
        print(i)
        if i.getAttribute("url") not in self.dlList:
            self.dlList.append(i.getAttribute("url"))

def writedlfile(self):
    f = open("dlist.txt","w")
    for i in self.dlList:
        f.write(i)
        f.write("\n")
    f.close()

if name == "main": GetNewsImg()`

neobrain commented 1 year ago

Thanks for the report! News banners should be fetched in the latest version.