question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

spankbang.com support is broken

See original GitHub issue

Checklist

  • I’m reporting a broken site support
  • I’ve verified that I’m running youtube-dl version 2019.11.28
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v https://spankbang.com/2q2ry/video/allura+5
[debug] System config: []
[debug] User config: [u'--external-downloader', u'aria2c', u'--hls-prefer-native']
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://spankbang.com/2q2ry/video/allura+5']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.28
[debug] Python version 2.7.13 (CPython) - Linux-4.19.72+-x86_64-with-debian-9.11
[debug] exe versions: ffprobe N-49006-gd81913e680-static, phantomjs 2.1.1
[debug] Proxy map: {}
[SpankBang] 2q2ry: Downloading webpage
ERROR: An extractor error has occurred. (caused by KeyError(u'sb_csrf_session',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/home/tinku6152112231/.python_scripts/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/home/tinku6152112231/.python_scripts/bin/youtube-dl/youtube_dl/extractor/spankbang.py", line 97, in _real_extract
    'https://spankbang.com')['sb_csrf_session'].value
KeyError: u'sb_csrf_session'
Traceback (most recent call last):
  File "/home/tinku6152112231/.python_scripts/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "/home/tinku6152112231/.python_scripts/bin/youtube-dl/youtube_dl/extractor/common.py", line 543, in extract
    raise ExtractorError('An extractor error has occurred.', cause=e)
ExtractorError: An extractor error has occurred. (caused by KeyError(u'sb_csrf_session',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


Description

Spankbang.com support is broken since today. They have changed their site layout, so that might be the reason. youtube-dl cannot find/download any spankang.com urls now. For example, this url fails: https://spankbang.com/2q2ry/video/allura+5

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:16

github_iconTop GitHub Comments

3reactions
bobfosscommented, Dec 22, 2019

This works for now…

--- a/youtube_dl/extractor/spankbang.py
+++ b/youtube_dl/extractor/spankbang.py
@@ -93,22 +93,22 @@
                 r'data-streamkey\s*=\s*(["\'])(?P<value>(?:(?!\1).)+)\1',
                 webpage, 'stream key', group='value')

-            sb_csrf_session = self._get_cookies(
-                'https://spankbang.com')['sb_csrf_session'].value
+            sb_session = self._get_cookies(
+                'https://spankbang.com')['sb_session'].value

             stream = self._download_json(
                 'https://spankbang.com/api/videos/stream', video_id,
                 'Downloading stream JSON', data=urlencode_postdata({
                     'id': stream_key,
                     'data': 0,
-                    'sb_csrf_session': sb_csrf_session,
+                    'sb_session': sb_session,
                 }), headers={
                     'Referer': url,
-                    'X-CSRFToken': sb_csrf_session,
+                    'X-CSRFToken': sb_session,
                 })

             for format_id, format_url in stream.items():
-                if format_id.startswith(STREAM_URL_PREFIX):
+                if format_id in ('240p','320p','480p','720p','1080p','4k'):
                     if format_url and isinstance(format_url, list):
                         format_url = format_url[0]
                     extract_format(
2reactions
grill05commented, Dec 16, 2019

I’ve investigated a bit more, and it seems its a simple renaming of variables. sb_csrf_session needs to change to sb_session , and then the rest of the extractor works perfectly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

broken sexually porn videos - SpankBang
Broken Sexually Porn Videos! - broken, sexually, broken sexually, bondage, sexually broken, bdsm Porn - SpankBang.
Read more >
Broken Porn - Hate Fuck & No Mercy Videos - SpankBang
Broken Slut in fishnet tights bangs her pussy to cum on cam: Fingering, Moaning, Wand Massager. 430 100% 3 weeks. Wife's broken ass!...
Read more >
Settings Porn - History & Uncensored Japanese Milf Videos
Settings Porn Videos! - History, Uncensored Japanese Milf, Camgirl Feet Porn - SpankBang. ... 17K 100% 1 year. Rules are made to be...
Read more >
Used Porn - Broken & Hate Fuck Videos - SpankBang
HD 118 min. The girl who used to torment me as a former classmate becomes my sister in law! I'm being tormented by...
Read more >
Broken Playlist - HD Porn Videos - SpankBang
Watch Broken playlist for free on SpankBang - 47 movies and sexy clips. Play trending and hottest Broken movies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found