xypwn / southpark-downloader-ui

Fully self-contained South Park downloader GUI, written in Go for Linux, Windows, MacOS & Android.
MIT License
44 stars 1 forks source link

Wrong URL redirection for US region #4

Closed verdverm closed 1 year ago

verdverm commented 1 year ago
retrieve series MGID in website data JSON: unable to find JSON data in webpage
xypwn commented 1 year ago

Hi, thanks for reporting. Could you please specify which episode you're downloading and which OS you're on? Also, make sure you're using the most recent version. I'm not home right now, so I can't check for reproducibility yet, but it'd be great if you could do those things in the meantime :)

verdverm commented 1 year ago

It was on startup, probably while fetching the catalog?

I'm on debian, cloned and built the latest myself

xypwn commented 1 year ago

Yes, it definitely was trying to fetch the catalog. Strange that it didn't work though, since I just tried on my Android phone and it worked OK (an older version supports Android).

It could be something to do with your region. Which country does the web service think you're in? Also, what happens when you try playing from https://www.southparkstudios.com?

verdverm commented 1 year ago

I'm in the US, when I go to that link, I get redirected to https://southpark.cc.com/ which looks to be working fine

verdverm commented 1 year ago

Are there any URLs that would be helpful for me to print? I can modify the code

verdverm commented 1 year ago
$ southpark-downloader-ui 
STORAGE: Saving config
any: https://www.southpark.cc.com/seasons/south-park/yjy8n9/season-1
base: https://www.southpark.cc.com

image

xypwn commented 1 year ago

Ohh. I know the problem now. Since it starts from www.southparkstudios.com it tries to redirect to www.southpark.cc.com, but only the non-www version seems to work in this case. I'll fix it and upload once I get home. In the meantime you can just remove the www. in the code and it should also work for you.

xypwn commented 1 year ago

Nice work debugging this so quickly!

verdverm commented 1 year ago

happy to help!

I found your project because I am looking at Fyne, and am a huge SP fan

How do you like Fyne yourself?

verdverm commented 1 year ago

Go this error once, but it seems to go away?

image

Every episode appears to be Unavailable

image

xypwn commented 1 year ago

Cool! I actually made this project to learn about fyne as well as programming video downloaders.

I think fyne can be really great for making GUIs without having to put in a lot of effort. It aims to be pretty simple to use, just like go itself, although in my opinion it does still have quite a few footguns. For example the widget callbacks aren't thread-safe for accessing the widget data, meaning you have to implement locking yourself. Also there are still some bugs and missing features (e.g. I just made a PR for undo/redo, which it doesn't have at the moment). In general though, I can definitely recommend it. It's easy to get started and the discord server has been a great resource for asking for help.

The 500 must be caused by SP an server bug. It happens sometimes, but is completely unpredictable from what I can tell. Maybe in the future I'll implement an auto-retry on 500. I think that's what the website does and why they probably didn't even fix the internal bug.

xypwn commented 1 year ago

I just committed the change :)

EDIT: Tested on all regions via VPN