Skip to content

Problem with a mp3? #3

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

Closed
Kribli-krabli opened this issue Nov 1, 2024 · 9 comments
Closed

Problem with a mp3? #3

Kribli-krabli opened this issue Nov 1, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@Kribli-krabli
Copy link

Kribli-krabli commented Nov 1, 2024

Sponsor error mp3
I guess if the video has few mp3 recordings, an error is returned:
Client error 404: URL not found: https://media.sponsr.ru/project/248/post/17249/file/5572/lessons124.mp3.....

@idlesign idlesign added the bug Something isn't working label Nov 2, 2024
@idlesign
Copy link
Owner

idlesign commented Nov 2, 2024

Thank you.
Will try to look at it eventually.

@idlesign
Copy link
Owner

idlesign commented Nov 5, 2024

Can't access 403 this content right now, since my subscription is expired.
Yet I've added some code to facilitate debugging.

You can try to run the app with --title "Урок 124" --debug
Error message will contain full data for a bogus file. Then you can try to follow the links, you find in that data.
Please check whether any of those links work (won't trigger 404). If any, please, report it here alonside with the debug data.

@Kribli-krabli
Copy link
Author

Kribli-krabli commented Nov 5, 2024

INFO    : Searching data for https://sponsr.ru/uzhukoffa_lessons/ ...
DEBUG   : Starting new HTTPS connection (1): sponsr.ru:443
DEBUG   : https://sponsr.ru:443 "GET /uzhukoffa_lessons/ HTTP/1.1" 200 None
DEBUG   : Project ID: 248
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=0 HTTP/1.1" 200 None
DEBUG   : Searched 20/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=20 HTTP/1.1" 200 None
DEBUG   : Searched 40/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=40 HTTP/1.1" 200 None
DEBUG   : Searched 60/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=60 HTTP/1.1" 200 None
DEBUG   : Searched 80/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=80 HTTP/1.1" 200 None
DEBUG   : Searched 100/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=100 HTTP/1.1" 200 None
DEBUG   : Searched 120/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=120 HTTP/1.1" 200 None
DEBUG   : Searched 140/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=140 HTTP/1.1" 200 None
DEBUG   : Searched 160/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=160 HTTP/1.1" 200 None
DEBUG   : Searched 180/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=180 HTTP/1.1" 200 None
DEBUG   : Searched 200/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=200 HTTP/1.1" 200 None
DEBUG   : Searched 220/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=220 HTTP/1.1" 200 None
DEBUG   : Searched 240/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=240 HTTP/1.1" 200 None
DEBUG   : Searched 260/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=260 HTTP/1.1" 200 None
DEBUG   : Searched 280/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=280 HTTP/1.1" 200 None
DEBUG   : Searched 300/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=300 HTTP/1.1" 200 None
DEBUG   : Searched 320/335 ...
DEBUG   : https://sponsr.ru:443 "GET /project/248/more-posts/?offset=320 HTTP/1.1" 200 None
DEBUG   : Searched 335/335 ...
INFO    : Found articles: 1
INFO    : Start dump using preference: VideoPreference(frame='640x360', sound='best') ...
INFO    : Configuration is loaded from sponsrdump.json ...
INFO    : [1/1 100.0%]  Downloading File 5572 [lessons124.mp3]:  ...
DEBUG   : Starting new HTTPS connection (1): media.sponsr.ru:443
DEBUG   : https://media.sponsr.ru:443 "GET /project/248/post/17249/file/5572/lessons124.mp3?token=*** HTTP/1.1" 404 None
DEBUG   : { '__idx': 1,
  'file_category': 'podcast',
  'file_created_at': '2022-07-09 00:55:53.000000',
  'file_duration': None,
  'file_exist': True,
  'file_id': 5572,
  'file_link': 'https://media.sponsr.ru/project/248/post/17249/file/5572/lessons124.mp3',
  'file_mime': 'audio/mpeg',
  'file_order': None,
  'file_path': 'https://media.sponsr.ru/project/248/post/17249/file/5572/lessons124.mp3?token=***',
  'file_preview_link': 'https://media.sponsr.ru/project/248/post/17249/file/5572/lessons124.mp3?preview=1',
  'file_preview_path': None,
  'file_size': 71111708,
  'file_title': 'lessons124.mp3'}
Traceback (most recent call last):
  File "/home/papa/Sponsor/./sponsrdump.py", line 678, in <module>
    dumper.dump(
  File "/home/papa/Sponsor/./sponsrdump.py", line 621, in dump
    self._download_file(filepath, dest=dest_filename, prefer_video=prefer_video)
  File "/home/papa/Sponsor/./sponsrdump.py", line 313, in _download_file
    response.raise_for_status()
  File "/usr/lib/python3/dist-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://media.sponsr.ru/project/248/post/17249/file/5572/lessons124.mp3?token=***

@Kribli-krabli
Copy link
Author

I can buy a subscription 4 u.

@idlesign
Copy link
Owner

idlesign commented Nov 5, 2024

I can buy a subscription 4 u.

Thank you, but don't bother.


Please try to open the link from file_path in browser. Also please try to do the same with the link from file_link.

@Kribli-krabli
Copy link
Author

image

@idlesign
Copy link
Owner

idlesign commented Nov 6, 2024

Hm. So this seems to not to be related to the dumper itself.
This needs some further investigation to find a workaround if any at all.

We could add an option to skip such errors if it can be considered suitable.
But already now you can skip audio duping using --no-audio option.

SnipGhost added a commit to SnipGhost/sponsrdump that referenced this issue Nov 15, 2024
@SnipGhost
Copy link
Contributor

I think it's a "re-upload" problem on the part of the site. The last file from the list was successfully downloaded, but it returns 404 for the previous 4 entries.

The behavior on the site is similar:
Снимок экрана 2024-11-15 в 14 48 55

It seems like we shouldn't see these 4 previous entries, maybe bug of sponsr.

You can use this workaround to ignore such errors: SnipGhost@cd79c8e

Tested on my NAS with these changes:
Снимок экрана 2024-11-15 в 14 54 50

@idlesign
Copy link
Owner

This seems to be worked around in 452f02c
We now do not even attempt to download files with no duration provided.

Considered closed.
Feel free to reopen if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants