Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to continue on HTML rewriting issue #73

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Conversation

benoit74
Copy link
Contributor

Fix #72

Changes: see list of commits, I've added few more related stuff

Command used for tests: mindtouch2zim --output ../output --library-url https://geo.libretexts.org --name libretexts.org_en_geo --creator LibreTexts --title "LibreTexts Geosciences" --description "Geosciences courses from libretexts.org" --file-name tests_en_libretexts-geo --overwrite --root-page-id 13022 --warn-only-on-html-issues

Resulting logs:

[mindtouch2zim::MainThread::2024-11-19 09:53:47,009] INFO:Generating ZIM
[mindtouch2zim::MainThread::2024-11-19 09:53:47,009] INFO:  Progress 0 / 1
[mindtouch2zim::MainThread::2024-11-19 09:53:47,012] INFO:  Writing to: ../output/tests_en_libretexts-geo.zim
[mindtouch2zim::MainThread::2024-11-19 09:53:47,012] INFO:  Fetching and storing home page...
[mindtouch2zim::MainThread::2024-11-19 09:53:47,734] INFO:  Fetching ZIM illustration...
[mindtouch2zim::MainThread::2024-11-19 09:53:47,824] INFO:  Storing configuration...
[mindtouch2zim::MainThread::2024-11-19 09:53:47,825] INFO:Adding 28 Vue.JS UI files in ../zimui/dist
[mindtouch2zim::MainThread::2024-11-19 09:53:47,858] INFO:Adding 125 MathJax files in /home/benoit/Repos/openzim/mindtouch/scraper/src/mindtouch2zim/mathjax
[mindtouch2zim::MainThread::2024-11-19 09:53:50,465] INFO:Fetching pages tree
[mindtouch2zim::MainThread::2024-11-19 09:53:53,274] INFO:1 pages (out of 8896) will be fetched and pushed to the ZIM
[mindtouch2zim::MainThread::2024-11-19 09:53:53,274] INFO:Fetching pages content
[mindtouch2zim::MainThread::2024-11-19 09:53:53,671] WARNING:Unsupported 'src' encountered in 'source' tag (value: 'https://svs.gsfc.nasa.gov/vis/a000000/a003600/a003658/thermohaline_conveyor_30fps.mp4') while rewriting page 13022 at https://geo.libretexts.org/Courses/Diablo_Valley_College/OCEAN-101%3A_Fundamentals_of_Oceanography_(Keddy)/11%3A_Ocean_Circulation/11.03%3A_Thermohaline_Circulation
[mindtouch2zim::MainThread::2024-11-19 09:53:53,671] WARNING:Unsupported 'src' encountered in 'embed' tag (value: 'https://svs.gsfc.nasa.gov/vis/a000000/a003600/a003658/thermohaline_conveyor_30fps.mp4') while rewriting page 13022 at https://geo.libretexts.org/Courses/Diablo_Valley_College/OCEAN-101%3A_Fundamentals_of_Oceanography_(Keddy)/11%3A_Ocean_Circulation/11.03%3A_Thermohaline_Circulation
[mindtouch2zim::MainThread::2024-11-19 09:53:53,677] INFO:0 private pages have been ignored
[mindtouch2zim::MainThread::2024-11-19 09:53:53,677] INFO:  Retrieving 203 assets...
[mindtouch2zim::MainThread::2024-11-19 09:53:58,170] INFO:  Progress 356 / 358
Resolve redirect
set index
[mindtouch2zim::MainThread::2024-11-19 09:53:59,732] INFO:ZIM creation completed, ZIM is at ../output/tests_en_libretexts-geo.zim
[mindtouch2zim::MainThread::2024-11-19 09:53:59,732] INFO:  Progress 358 / 358

@benoit74 benoit74 added this to the 0.1 milestone Nov 19, 2024
@benoit74 benoit74 self-assigned this Nov 19, 2024
@benoit74 benoit74 removed this from the 0.1 milestone Nov 19, 2024
@benoit74 benoit74 force-pushed the bad_href_src_warning branch from db7a59e to e9677a4 Compare November 19, 2024 09:59
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 43.85%. Comparing base (f3d6b9a) to head (e22e348).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
scraper/src/mindtouch2zim/html_rewriting.py 35.29% 9 Missing and 2 partials ⚠️
scraper/src/mindtouch2zim/processor.py 50.00% 2 Missing ⚠️
scraper/src/mindtouch2zim/client.py 50.00% 1 Missing ⚠️
scraper/src/mindtouch2zim/entrypoint.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
- Coverage   43.86%   43.85%   -0.01%     
==========================================
  Files          15       15              
  Lines         953      969      +16     
  Branches      131      133       +2     
==========================================
+ Hits          418      425       +7     
- Misses        522      529       +7     
- Partials       13       15       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@benoit74 benoit74 marked this pull request as ready for review November 19, 2024 10:01
@benoit74 benoit74 requested a review from rgaudin November 19, 2024 10:01
scraper/src/mindtouch2zim/constants.py Outdated Show resolved Hide resolved
scraper/src/mindtouch2zim/entrypoint.py Outdated Show resolved Hide resolved
@benoit74 benoit74 merged commit 28010e6 into main Nov 19, 2024
10 checks passed
@benoit74 benoit74 deleted the bad_href_src_warning branch November 19, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add flag to only log a warning when HTML rewriting issue arises
2 participants