yodiaditya / slideshare-downloader Goto Github PK
View Code? Open in Web Editor NEWSlideshare to PDF downloader. Using Selenium and auto scroll-down to get the entire slides completely.
Home Page: https://yodiw.com
Slideshare to PDF downloader. Using Selenium and auto scroll-down to get the entire slides completely.
Home Page: https://yodiw.com
store images in subdirectory in /tmp
so that they get flushed on restart.
And also, slideshare2pdf.py
would be a better name than convert.py
The current version of img2pdf only works for python 3.
Requirements.txt needed to be amended to "img2pdf==0.1.3"
$ pip3 install -r requirements_py3.txt
...
Successfully installed beautifulsoup4-4.10.0 bs4-0.0.1 img2pdf-0.4.3 lxml-4.8.0 pikepdf-5.0.0 soupsieve-2.3.1
$ python3 convertpdf.py https://www.slideshare.net/gskachkov/webassembly-vs-javascript-what-is-faster
yodiaditya/slideshare-downloader/convertpdf.py:22: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 22 of the file yodiaditya/slideshare-downloader/convertpdf.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.
soup = BeautifulSoup(html)
[]
Traceback (most recent call last):
File "yodiaditya/slideshare-downloader/convertpdf.py", line 75, in <module>
download_images(url)
File "yodiaditya/slideshare-downloader/convertpdf.py", line 31, in download_images
convert_pdf(title)
File "yodiaditya/slideshare-downloader/convertpdf.py", line 55, in convert_pdf
pdf_bytes = img2pdf.convert(f, dpi=300, x=None, y=None)
File "~/.local/lib/python3.9/site-packages/img2pdf.py", line 2223, in convert
raise ValueError("Unable to process empty list")
ValueError: Unable to process empty list
Hi, I found these error when trying to execute your script
$ python slideshare2pdf.py https://www.slideshare.net/robertmetzger1/apache-flink-hands-on
Traceback (most recent call last):
File "/home/opc/slideshare-downloader/slideshare2pdf.py", line 36, in <module>
driver = webdriver.Chrome("/snap/bin/chromium.chromedriver", options=options)
TypeError: WebDriver.__init__() got multiple values for argument 'options'
Please kindly advise. Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.