rand-net/khan-dl

AttributeError

Closed this issue · 1 comments

srghma commented
khan-dl -c https://www.khanacademy.org/economics-finance-domain/microeconomics
 _  __ _   _     _     _   _         ____   _
| |/ /| | | |   / \   | \ | |       |  _ \ | |
| ' / | |_| |  / _ \  |  \| | _____ | | | || |
| . \ |  _  | / ___ \ | |\  ||_____|| |_| || |___
|_|\_\|_| |_|/_/   \_\|_| \_|       |____/ |_____|


Looking up https://www.khanacademy.org/economics-finance-domain/microeconomics...
Course URL: https://www.khanacademy.org/economics-finance-domain/microeconomics
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/khan-dl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/khan_dl/__init__.py", line 65, in main
    khan_down.download_course_given(selected_course_url)
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/khan_dl/khan_dl.py", line 424, in download_course_given
    self.get_course_title()
  File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/khan_dl/khan_dl.py", line 188, in get_course_title
    self.course_title = course_title.text.replace(" ", "_")
                        ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'

Fixed in latest release 1.2.8