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.

Daily Wire Not Working TypeError: 'NoneType' object is not iterable

See original GitHub issue

Checklist

  • I’m reporting a broken site
  • I’ve verified that I’m running yt-dlp version 2022.06.22.1 (update instructions) or later (specify commit)
  • I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
  • 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. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue
  • I’ve read about sharing account credentials and I’m willing to share it if required

Region

United States

Description

I’m excited about the new Daily Wire Extractor but I have not been able to get it to work. I tried both without and with cookies and I get a TypeError: ‘NoneType’ object is not iterable. Let me know if I’m doing something wrong. Thank you!

Verbose log

PS C:\Users\jcsch> yt-dlp https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2 --verbose
[debug] Command-line config: ['https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2', '--verbose']
[debug] Portable config "G:\yt-dlp\yt-dlp.conf": ['-o', 'G:/YoutubeDL/%(title)s.%(ext)s', '--external-downloader', 'aria2c']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.22.1 [a86e01e] (win32_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.22000-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 2022-03-24-git-28d011516b-essentials_build-www.gyan.dev (setts), ffprobe 2022-03-24-git-28d011516b-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] [DailyWire] Extracting URL: https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2
[DailyWire] ep-1520-the-return-of-religious-freedom-bonus-hour-2: Downloading webpage
ERROR: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1427, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1497, in __extract_info
  File "yt_dlp\extractor\common.py", line 647, in extract
  File "yt_dlp\extractor\dailywire.py", line 63, in _real_extract
TypeError: 'NoneType' object is not iterable

PS C:\Users\jcsch> yt-dlp https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2 --cookies G:\yt-dlp\dw.txt --verbose
[debug] Command-line config: ['https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2', '--cookies', 'G:\\yt-dlp\\dw.txt', '--verbose']
[debug] Portable config "G:\yt-dlp\yt-dlp.conf": ['-o', 'G:/YoutubeDL/%(title)s.%(ext)s', '--external-downloader', 'aria2c']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.22.1 [a86e01e] (win32_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.22000-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 2022-03-24-git-28d011516b-essentials_build-www.gyan.dev (setts), ffprobe 2022-03-24-git-28d011516b-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] [DailyWire] Extracting URL: https://www.dailywire.com/episode/ep-1520-the-return-of-religious-freedom-bonus-hour-2
[DailyWire] ep-1520-the-return-of-religious-freedom-bonus-hour-2: Downloading webpage
ERROR: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1427, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1497, in __extract_info
  File "yt_dlp\extractor\common.py", line 647, in extract
  File "yt_dlp\extractor\dailywire.py", line 63, in _real_extract
TypeError: 'NoneType' object is not iterable

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:27 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Jun 27, 2022

self._get_cookies(url).get(cookie_name)

1reaction
coletdjnzcommented, Jun 27, 2022

The return of this requests is html for successful login and json for failed login.

  1. How to handle the return like this ? should i set something like self._parse_json(..., fatal=False) ?
try:
    webpage = _download_webpage(url, video_id)
except ExtractorError as e:
    if not isinstance(e.cause, urllib.error.HTTPError):
        raise
    error = self._parse_json(e.cause.read(), video_id)

then the url request to something like <redirect_url>?code=<code> with HTTP code 302

  1. How to get this url as the is not found in api call or in html ? can't this redirected automatically ?

I believe we currently have no mechanism to get the intermediate URL of the redirect thinking. Any ideas @coletdjnz

I don’t think this has anything to do with getting the intermediate URL between redirects.

then the url request to something like <redirect_url>?code=<code> with HTTP code 302

How to get this url as the <code> is not found in api call or in html ? can't this redirected automatically ?

Use self._request_webpage which gives you the http response instance (not just the webpage data), which you can do .geturl() on. This will give you the final url in the HTTP redirect chain.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: 'NoneType' object is not iterable in Python
It means the value of data is None .
Read more >
3 Fixes For The TypeError: 'NoneType' object is not iterable Error
In this post, we provide 3 fixes for the TypeError: 'NoneType' object is not iterable Error.
Read more >
2022.6: Gaining new insights! - Home Assistant
Hi there, Home Assistant Core 2022.6! The June release brings insights! Insights on how you are doing with your energy usage, and insights ......
Read more >
58c21cf9d2a5945c2c12b708817... - Oracle Linux Yum Server
require cobbler20 - Spacewalk is not working with upstream cobbler anyway - Recommend ... 1419867 - fixing 'NoneType object is not iterable' error...
Read more >
Untitled
Mysql left join not working, Ntrcnehs lkz cfqnf, Licno osiguranje dunav, ... Strong heart july 24 2012 eng sub, Python sort nonetype object...
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