paljsingh / impartus-downloader Goto Github PK
View Code? Open in Web Editor NEWDownload Impartus lectures, convert to mkv for offline viewing.
License: GNU General Public License v3.0
Download Impartus lectures, convert to mkv for offline viewing.
License: GNU General Public License v3.0
Describe the bug
If the track is more than 1, then the video is empty, 1KB
To Reproduce
download any video with track more than 1, check the video size
Expected behavior
Video is expected to be full
Screenshots
Desktop (please complete the following information):
At present it takes more than a second to show the sorted table content, the entire table goes blank during this time.
Not a very good user experience.
OSX UI apps for historical reasons use ':' as file separator (since HFS days),
The posix based cli tools allow ':' character in the file name, but the same is shown in Finder.app as '/' character.
Filter out ':' character in the filepath structure to keep the discrepancy away.
Error response on console:
ERROR:Impartus:[4081252]: Error fetching slides from url: https://a.impartus.com/download1/installer/impartus/w64/Impartus-1.2.8-setup.exe and https://a.impartus.com/download1/installer/impartus/w32/Impartus-1.2.8-setup.exe
ERROR:Impartus:[4081252]: Http response code: 404, response body:
Cannot GET /https://a.impartus.com/download1/installer/impartus/w64/Impartus-1.2.8-setup.exe%20and%20%20https://a.impartus.com/download1/installer/impartus/w32/Impartus-1.2.8-setup.exe
Also,
possibly in slide's title / content
and video chat content.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
'/' character from the subject/path should be removed/sanitized.
For flipped lectures, the video resolution option should be available on the UI, so that one doesn't have to restart the app.
Treeview though only supports label widgets, and buttons/progressbar cannot be a part of it,
may be adding a sub-frame can help here.
If not, the label widgets can be rendered via Treeview, which may also improve the usability and performance issues with the current table.
Describe the bug
It should also check the parent directory, and remove it if it is empty, do it recursively.
To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Tooltip for truncated label strings, busy cursor while content is loading etc.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
tkinter is not as feature rich, and is painfully slow.
use a better / more modern UI library.
Describe the bug
new version of tksheet published on 11th June is breaking the module.
To Reproduce
Steps to reproduce the behavior:
Error Stack
Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\<>\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__ return self.func(*args) File "C:\Users\<>\Documents\impartus_downloader\idm\ui\content.py", line 900, in show_video_callback self.set_display_widgets() File "C:\Users\<>\Documents\impartus_downloader\idm\ui\content.py", line 145, in set_display_widgets self.fill_content() File "C:\Users\<>\Documents\impartus_downloader\idm\ui\content.py", line 460, in fill_content self._init_content() File "C:\Users\<>\Documents\impartus_downloader\idm\ui\content.py", line 98, in _init_content self.set_display_columns() File "C:\Users\<>\Documents\impartus_downloader\idm\ui\content.py", line 735, in set_display_columns self.sheet.display_columns(indexes=column_states, enable=True, redraw=False) File "C:\Users\<>\AppData\Local\Programs\Python\Python37\lib\site-packages\tksheet\_tksheet.py", line 2156, in display_columns return self.displayed_columns(indexes = indexes, enable = enable, reset_col_positions = reset_col_positions, set_col_positions = set_col_positions, refresh = refresh, redraw = redraw, deselect_all = deselect_all) File "C:\Users\<>\AppData\Local\Programs\Python\Python37\lib\site-packages\tksheet\_tksheet.py", line 2147, in displayed_columns deselect_all = deselect_all) File "C:\Users\<>\AppData\Local\Programs\Python\Python37\lib\site-packages\tksheet\_tksheet_main_table.py", line 3333, in display_columns if enable and list(range(len(max(self.data_ref, key = len)))) != self.displayed_columns: ValueError: max() arg is an empty sequence
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The scrollbar is quite jerky at present.
without having to relaunch the application.
A video downloaded at the time when the topic was unset ends up with a file path as
$HOME/wilp/subject-profname/NN-No-Topic-Entered-yyyy-mm-dd.mkv
If at a later point the topic is updated, the application on a next relaunch, expects the downloaded video at the path:
$HOME/wilp/subject-prof-name/NN-New-Topic-Description-yyyy-mm-dd.mkv
Failing to find a file here, it shows the download status as 0%.
A similar case happens, if the user adds a new rule to map video being marked under Misc category to a new subject category,
or
if the video_path format is changed.
or
the video is manually moved to a new folder, or renamed.
may be also add option to show 10, 20, 50 rows at a time.
The username can be added to the conf file at present, which shows up on the UI.
It may be good to have a checkbox to save both username and password and save those to config file.
The chats are available per lecture under
/api/videos/<ttid>/chat
The auto-generated slides are the screenshots of the video taken at regular interval and saved as a pdf/ppt by the impartus platform. The page content, though blurry and not selectable, can still be usable when no other real slides are available.
OS.path and OS.xxx functions do not seem to retrieve the required path type. There is no HOME present explicitly in my windows profile, however when I created one, the script throwed an error:
expected escape sequence of 8 hexdecimal numbers, but found 's'
in "", line 2, column 18:
target_dir: "C:\Users\XYZ/wilp"
^
After changing this to expected pattern of "C:/Users/XYZ", the script ran, and opened firefox and everything, but failed after downloading in firefox:
c:\sw\impartus-downloader>python impartus.py
Files will be saved at: C:/Users/XYZ/wilp
Traceback (most recent call last):
File "c:\sw\impartus-downloader\impartus.py", line 129, in
impartus.process_videos()
File "c:\sw\impartus-downloader\impartus.py", line 68, in process_videos
media_files = self.browser.get_media_files(ttid)
File "c:\sw\impartus-downloader\browser\firefox.py", line 159, in get_media_files
conn = sqlite3.connect(self.indexed_db())
File "c:\sw\impartus-downloader\browser\firefox.py", line 171, in indexed_db
db = os.path.join(os.path.dirname(media_dir), os.path.basename(media_dir).split('.')[0] + ".sqlite")
File "C:\sw\python3\lib\ntpath.py", line 223, in dirname
return split(p)[0]
File "C:\sw\python3\lib\ntpath.py", line 185, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Tahoma font on windows makes the progress bar characters choppy and uneven, while it looks pretty good on OSX.
configuration file should have option to specify default content_font for each of the supported platforms, keeping the UI aesthetics in mind.
A cli that supports options like:
Describe the bug
strftime('%s') is deprecated and it throws the invalid format error on python 3.7.10.
To get the epochtime we can use timestamp() from datetimetime object.
https://github.com/paljsingh/impartus-downloader/blob/master/ui/content.py#L502
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Error Stack
Exception in thread Thread-7:
Traceback (most recent call last):
File "C:\Users<>\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\Users<>\AppData\Local\Programs\Python\Python37\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users<>\Documents\impartus_downloader\idm\ui\content.py", line 533, in _download_video
self.save_captions_if_needed(video_metadata, root_url, captions_path)
File "C:\Users<>\Documents\impartus_downloader\idm\ui\content.py", line 502, in save_captions_if_needed
start_epoch = int(datetime.strptime(video_metadata['startTime'], date_format).strftime('%s'))
ValueError: Invalid format string
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
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.