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

MSO: Verizon vs. Verizon_HBA #16084

Closed
Zenexer opened this issue Apr 3, 2018 · 3 comments
Closed

MSO: Verizon vs. Verizon_HBA #16084

Zenexer opened this issue Apr 3, 2018 · 3 comments

Comments

@Zenexer
Copy link

@Zenexer Zenexer commented Apr 3, 2018

Verizon was added as a supported MSO in #12721 to fix #10803. However, some providers only list Verizon_HBA, not Verizon. Take TBS, for example (https://sp.auth.adobe.com/adobe-services/config/TBS):

<mvpd>
<id visible="true">Verizon_HBA</id>
<displayName visible="true">Verizon Fios</displayName>
<logoUrl visible="true">
https://ssoauth.verizon.com/vzstatic/sso/resources/images/sso/vz_fios_white.png
</logoUrl>
<foregroundLogout>true</foregroundLogout>
<authPerAggregator>false</authPerAggregator>
<authPerBrowserSession>false</authPerBrowserSession>
<iFrameRequired visible="true">false</iFrameRequired>
<iFrameWidth visible="true">320</iFrameWidth>
<iFrameHeight visible="true">220</iFrameHeight>
</mvpd>

There are still networks that use Verizon, such as ABC.

I don't know the difference between Verizon and Verizon_HBA. As far as I can tell, the login process is the same. In my testing, it's been sufficient to handle *HBA exactly the same was as the original, which only requires two edits:

diff --git a/youtube_dl/extractor/adobepass.py b/youtube_dl/extractor/adobepass.py
index b83b51efb..76d8de1f8 100644
--- a/youtube_dl/extractor/adobepass.py
+++ b/youtube_dl/extractor/adobepass.py
@@ -60,6 +60,11 @@ MSO_INFO = {
         'username_field': 'IDToken1',
         'password_field': 'IDToken2',
     },
+    'Verizon_HBA': {
+        'name': 'Verizon FiOS',
+        'username_field': 'IDToken1',
+        'password_field': 'IDToken2',
+    },
     'thr030': {
         'name': '3 Rivers Communications'
     },
@@ -1455,7 +1460,7 @@ class AdobePassIE(InfoExtractor):
                         mvpd_confirm_page, urlh = mvpd_confirm_page_res
                         if '<button class="submit" value="Resume">Resume</button>' in mvpd_confirm_page:
                             post_form(mvpd_confirm_page_res, 'Confirming Login')
-                elif mso_id == 'Verizon':
+                elif mso_id == 'Verizon' or mso_id == 'Verizon_HBA':
                     # In general, if you're connecting from a Verizon-assigned IP,
                     # you will not actually pass your credentials.
                     provider_redirect_page, urlh = provider_redirect_page_res

I don't have the necessary experience with this sort of thing to determine if that fix has unintended side effects. I also haven't tested it on a non-FiOS IP address, on which the authentication flow would be a little different.

Here's a test URL: http://www.tbs.com/shows/final-space/season-1/episode-3/chapter-three That's probably not going to require authentication for much longer, though. (It also has another issues: #16083)

Example output when using Verizon:

[debug] System config: []
[debug] User config: [u'--hls-prefer-native', u'--prefer-ffmpeg', u'--ap-mso', u'Verizon', u'--ap-username', u'PRIVATE', u'--ap-password', u'PRIVATE']
[debug] Custom config: []
[debug] Command-line args: [u'http://www.tbs.com/shows/final-space/season-1/episode-3/chapter-three', u'http://www.tbs.com/shows/final-space/season-1/episode-4/chapter-four', u'http://www.tbs.com/shows/final-space/season-1/episode-5/chapter-five', u'http://www.tbs.com/shows/final-space/season-1/episode-6/chapter-six', u'--verbose', u'--write-pages']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.26.1
[debug] Python version 2.7.10 (CPython) - Darwin-17.4.0-x86_64-i386-64bit
[debug] exe versions: avconv 12.3, avprobe 12.3, ffmpeg 3.4.2, ffprobe 3.4.2, rtmpdump 2.4
[debug] Proxy map: {}
[TBS] chapter-three: Downloading webpage
[TBS] Saving request to chapter-three_http_-_www.tbs.com_shows_final-space_season-1_episode-3_chapter-three.dump
[TBS] 9630f04c7e8af9303f4f9ff3e48b548f7915ce6e: Downloading JSON metadata
[TBS] Saving request to 9630f04c7e8af9303f4f9ff3e48b548f7915ce6e_http_-_medium.ngtv.io_media_9630f04c7e8af9303f4f9ff3e48b548f7915ce6e_tv.dump
[TBS] 9630f04c7e8af9303f4f9ff3e48b548f7915ce6e: Downloading Provider Redirect Page
ERROR: Unable to download webpage: HTTP Error 400: Bad Request (caused by HTTPError()); 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.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 519, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2199, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

youtube-dl     --verbose --write-pages  2.29s user 0.50s system 63% cpu 4.370 total

(ignore the contradictory config args; I was trying to fix something else while I was at it)

@Zenexer
Copy link
Author

@Zenexer Zenexer commented Apr 3, 2018

I noticed I was using contradictory config args and an older version of youtube-dl in that log, but I get the same result on master. I was testing some other stuff.

@SkiTheSlicer
Copy link

@SkiTheSlicer SkiTheSlicer commented Apr 13, 2018

I made a pull request back in September to add Verizon_HBA, but it has yet to be merged.

@spookyahell spookyahell mentioned this issue Oct 8, 2019
6 of 6 tasks complete
@Zenexer
Copy link
Author

@Zenexer Zenexer commented Nov 19, 2019

Verizon_HBA no longer appears to be used, so I'm closing this issue. There are still problems with Verizon login, but they're unrelated. This patch fixes it for me: https://bitbucket.org/ParadoxGBB/youtube-dl/commits/64bddfe15c1458a1b3461875bf9afd0a17ebeea0

@Zenexer Zenexer closed this Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.