obskyr / khinsider

A script for khinsider mass downloads. Get video game soundtracks quickly and easily! Also a Python interface.
588 stars 63 forks source link

Escape 'release on' URLs #40

Closed 4piu closed 4 years ago

4piu commented 4 years ago

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

obskyr commented 4 years ago

Could you provide a command that triggers this bug?

vtdiep commented 4 years ago

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 https://github.com/obskyr/khinsider/blob/00453f11e03dcb8eb92baba526990dc0f995976b/khinsider.py#L294 to urls = [a['href'] for a in anchors if a.find("img") is not None] should solve the issue

obskyr commented 4 years ago

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