ankitsejwal / Lyndor

:rocket: Powerful command line tool to download lynda.com courses for personal offline use. :part_alternation_mark:
MIT License
131 stars 32 forks source link

exercise file not downloading #76

Closed hyber-code closed 5 years ago

hyber-code commented 6 years ago

Please follow the guide below


Make sure you are using the latest version: run git pull to update your version from Lyndor directory

Before submitting an issue make sure you have:

What is the purpose of your issue?


If the purpose of this issue is a bug report, or you are not completely sure then provide the full terminal output as follows:

Copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

Traceback (most recent call last):
  File "/Users/pi/Projects/lyndor/run.py", line 130, in <module>
    main()
  File "/Users/pi/Projects/lyndor/run.py", line 35, in main
    schedule_download(url)
  File "/Users/pi/Projects/lyndor/run.py", line 51, in schedule_download
    download_course(url)
  File "/Users/pi/Projects/lyndor/run.py", line 78, in download_course
    course_folder_path = save.course_path(url, lynda_folder_path)
NameError: global name 'save' is not defined

Answer questions related to your Environment which will help in reproducing the issue:

The issue was encountered on: :computer:

Login method:

Enter the python version you are using for download. Find your python version by typing in terminal python -V


If the purpose of this issue is a bug report please provide all kinds of example URLs where you encountered issues (replace following example URLs by yours):


Description of your issue, suggested a solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.

 videos/subtitles moved to appropriate chapters successfully.

Exercise file is available to download
Traceback (most recent call last):
  File "run.py", line 137, in <module>
    main()
  File "run.py", line 36, in main
    schedule_download(url)
  File "run.py", line 55, in schedule_download
    download_course(url)
  File "run.py", line 123, in download_course
    exercise_file.download(url, course_folder_path, cookie_path)
  File "D:\****\***\Lyndor\module\exercise_file.py", line 22, in download
    driver = webdriver.Firefox()
  File "C:\****\***\\py3\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 158, in __init__
    keep_alive=True)
  File "C:\****\***\\py3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 154, in __init__
    self.start_session(desired_capabilities, browser_profile)
  File "C:\****\***\\py3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 243, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\****\***\\py3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 312, in execute
    self.error_handler.check_response(response)
  File "C:\****\***\\py3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: newSession

-facing the same issue -everything else is working perfectly -somehow script is not picking aria2c and going for selenium. even though aria2c is selected defualt and properly installed (added to path) and path also working correctly. -using cookies method -i have organization login

url of course is https://www.lynda.com/course-tutorials/InDesign-Interactive-PDFs-Revision/688517-2.html

hyber-code commented 6 years ago
1540658406487   geckodriver INFO    geckodriver 0.19.1
1540658406494   geckodriver INFO    Listening on 127.0.0.1:58690
1540658409612   mozrunner::runner   INFO    Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\****\\AppData\\Local\\Temp\\rust_mozprofile.zA6IOCb7pLf5"
1540658410014   Marionette  DEBUG   Received observer notification profile-after-change
1540658410061   Marionette  DEBUG   Received observer notification toplevel-window-ready
1540658410084   Marionette  DEBUG   Received observer notification command-line-startup
1540658410084   Marionette  DEBUG   Received observer notification nsPref:changed
1540658410084   Marionette  DEBUG   Init aborted (running=false, enabled=true, finalUIStartup=false)
1540658410171   Marionette  DEBUG   Received observer notification toplevel-window-ready
1540658410776   Marionette  DEBUG   Received observer notification sessionstore-windows-restored
1540658410776   Marionette  DEBUG   Waiting for delayed startup...
1540658410829   Marionette  DEBUG   Setting recommended pref app.update.disabledForTesting to true
1540658410829   Marionette  DEBUG   Setting recommended pref security.turn_off_all_security_so_that_viruses_can_take_over_this_computer to true
1540658410830   Marionette  DEBUG   Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1540658410830   Marionette  DEBUG   Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1540658410830   Marionette  DEBUG   Setting recommended pref dom.disable_beforeunload to true
1540658410873   Marionette  INFO    Listening on port 58698
1540658410873   Marionette  DEBUG   Remote service is active
1540658411146   Marionette  DEBUG   Accepted connection 0 from 127.0.0.1:58708
1540658411147   Marionette  TRACE   0 -> [0,1,"newSession",{"acceptInsecureCerts":true,"browserName":"firefox","capabilities":{"desiredCapabilities":{"acceptInsecureCerts":true,"browserName":"firefox"}}}]
1540658411147   Marionette  TRACE   0 <- [1,1,{"error":"unknown command","message":"newSession","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178: ... et@chrome://marionette/content/server.js:245:8\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:490:9\n"},null]

here is the output in downloaded folder

ankitsejwal commented 6 years ago

Hi, @hyber-code exercise file download is not supported by organizational login, unless you have a library account. The reason why aria2c is there as an option is that it is faster and more efficient to download exercise files using aria2c by reduced CPU utilization.