Closed BernierCR closed 5 years ago
This script supports PDF files too.
If it doesn't work on your course, is there a free course that I can subscribe to it or are they all paid courses? I would like to get some output from your side. If you don't mind, please let me know the output of adding this line p lecture_page
in line 135 of lib/course_finder.rb for my reference.
Thanks.
The free courses probably don't hide the PDF from you. I think that's what is happening. They are tricking you. The correct file doesn't end in .pdf. I replaced the secret parts of this output with [num] and [code]. That filepicker link has no extension but will point to the actual PDF file. Would you be able to make it get that file?
Finding https://stackskills.com/courses/enrolled/330327 from your list of courses Number of courses found: 1
{url #<URI::HTTPS https://stackskills.com/courses/330327/lectures/5062991>} {meta_refresh} {title "Implementing Azure Solutions | StackSkills"} {iframes} {frames} {links
"\n" + " \n" + " \n" + " Previous Lecture\n" + " " "">
"\n" + " Complete and continue\n" + " \n" + " \n" + " " "">
"\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " Implementing Azure Solutions\n" + " \n" + " \n" + " \n" + " " "/courses/implementing-azure-solutions/lectures/5062991">
"\n" + " \n" + " [num].pdf\n" + " " "https://www.filepicker.io/api/file/[code]">} {forms}>
Downloading Course: Enrolled Downloading Implementing_Azure_Solutions Sorry, this lecture is not available to download
Actually, if you add something like this, it works.
pdf2 = lecture_page.link_with(href: /filepicker/) lecture.add_pdf(pdf2) if pdf2
You can make that nicer of course.
The name also comes out to a random number. So if you could rename the pdf after the lecture name instead of the random number, that would be helpful.
Glad it worked for you :)
Regarding the file name, do you mean all pdf files in general or the pdf files from filepicker?
yoonwaiyan, It appears that the program does not download PDF files. In some courses, you can manually download the PDF files. However, in other parts of the course, there is no download function on the PDF viewer. Would it be possible to add this functionality to the program? Thanks.
@linux95 Do you mean that there are such cases that you seen which is similar to what's being reported by @BernierCR ? If it's not, can I have an example of your case?
yoonwaiyan, Yes. It appears to be the same issue that @BernierCR is having. I get the same error and have to go into each course and download the PDF's individually or do a screenshot. Hope this helps.
Just patch your local copy the way i did.
On Wed, Nov 7, 2018, 7:49 AM linux95 <notifications@github.com wrote:
yoonwaiyan, Yes. It appears to be the same issue that @BernierCR https://github.com/BernierCR is having. I get the same error and have to go into each course and download the PDF's individually or do a screenshot. Hope this helps.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yoonwaiyan/stackskills-dl/issues/39#issuecomment-436612346, or mute the thread https://github.com/notifications/unsubscribe-auth/ADfj_Iv-lrR3sLzX2fY_VUzZM1aFJw_Cks5ustbpgaJpZM4W7PV4 .
I tried several of my courses but failed to get any course with PDF files other than cloudfront hosted PDF files. For now if there's any edge case you can definitely make the source code work by adding custom PDF finder like what @BernierCR did. I will work on the documentation on this but will keep in view in case it's a common pattern that I could help on it.
Hey, good job on this.
However, the reason I wanted this is to download PDF based courses, not the mp4 ones. Some of these courses are really just a PDF of an E-book. I'd like that as a pdf file instead of embedded in the website.
Any way you could add this?
Thanks