Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with spdl.py #1

Open
abhijitb81 opened this issue Dec 21, 2020 · 8 comments
Open

Problem with spdl.py #1

abhijitb81 opened this issue Dec 21, 2020 · 8 comments

Comments

@abhijitb81
Copy link

Collecting episodes to download...
Traceback (most recent call last):
  File "D:\spdl-southpark\spdl.py", line 489, in <module>
    for season in s.get_all_seasons():
  File "D:\spdl-southpark\spdl.py", line 362, in get_all_seasons
    for season in self.get_season_numbers():
  File "D:\spdl-southpark\spdl.py", line 353, in get_season_numbers
    return sorted(set([int(x.group(1)) for x in re.finditer(r'data-value="season-(\d+)"', resp)])) or list(range(24))
  File "C:\Python39\lib\re.py", line 248, in finditer
    return _compile(pattern, flags).finditer(string)
TypeError: cannot use a string pattern on a bytes-like object

This happens on WIndows and Mac with Python 3.9.1

@mrmk85
Copy link

mrmk85 commented Jan 7, 2021

I can confirm, same here on ubuntu 20.04

/edit
Python 3.8.5

Collecting episodes to download...
Traceback (most recent call last):
File "spdl.py", line 489, in
for season in s.get_all_seasons():
File "spdl.py", line 363, in get_all_seasons
yield self.get_season(season)
File "spdl.py", line 380, in get_season
season_data = json.loads(http_get(url))
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@ruben280302
Copy link

same issue with macOS 11.1 python 3.8.5

% python3 spdl.py S01
Collecting episodes to download...
Traceback (most recent call last):
File "spdl.py", line 515, in
for e in s.get_season(season).episodes:
File "spdl.py", line 380, in get_season
season_data = json.loads(http_get(url))
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@rgkobashi
Copy link

Yep, same issue with macOS 10.15.7 and python 3.9.1:

Collecting episodes to download...
Traceback (most recent call last):
  File "/Users/kobashi/Downloads/spdl-southpark-downloader-master/spdl.py", line 489, in <module>
    for season in s.get_all_seasons():
  File "/Users/kobashi/Downloads/spdl-southpark-downloader-master/spdl.py", line 363, in get_all_seasons
    yield self.get_season(season)
  File "/Users/kobashi/Downloads/spdl-southpark-downloader-master/spdl.py", line 380, in get_season
    season_data = json.loads(http_get(url))
  File "/Users/kobashi/.pyenv/versions/3.9.1/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/Users/kobashi/.pyenv/versions/3.9.1/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/Users/kobashi/.pyenv/versions/3.9.1/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@ThisLimn0
Copy link

Same for me but i think the Dev has abadoned the project...

@mityax
Copy link
Owner

mityax commented Mar 11, 2021

Oh hey there, didn't see this issue before. Seems like an API change on southpark's side... I'm currently very busy and cannot promise I'll fix this soon but I'll have a look as soon as possible.
If anyone wants to create a PR, you'd be welcome :)

@tfga
Copy link

tfga commented Apr 15, 2021

The url that is being used returns a 301 (for my location, at least):

$ curl -i 'https://southpark.cc.com/feeds/carousel/video/06bb4aa7-9917-4b6a-ae93-5ed7be79556a/30/1/json/!airdate/season-9?lang=en'
HTTP/2 301
server: AkamaiGHost
content-length: 0
location: https://www.southparkstudios.com.br/feeds/carousel/video/06bb4aa7-9917-4b6a-ae93-5ed7be79556a/30/1/json/!airdate/season-9?lang=en
date: Thu, 15 Apr 2021 07:01:45 GMT

and if you follow the redirect, you get a 404. 😐

@JohnTrunix
Copy link

Is anyone working on a PR or has found a solution? @mityax

@ThisLimn0
Copy link

ThisLimn0 commented Jan 31, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants