obskyr / khinsider

A script for khinsider mass downloads. Get video game soundtracks quickly and easily! Also a Python interface.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Escape 'release on' URLs

4piu opened this issue · comments

commented

The URLs in the webpage section Released on: Android iOS Windows should not be matched, or some html files would be downloaded.

Could you provide a command that triggers this bug?

Hi, this is my first time commenting so apologies if anything is amiss.

I think that the issue is that soundtracks that have been released on multiple consoles have links to those console pages, and those links are being accepted as image links.
For example, "sonic-adventure-2-original-sound-track" has links to 5 consoles, which results in 5 extra html files being downloaded:
image

I think changing

urls = [a['href'] for a in anchors]
to urls = [a['href'] for a in anchors if a.find("img") is not None] should solve the issue

Thanks for the example! Perfect fix, too, @vtdiep.
Fixed in the latest version coming in a few seconds!