danny0838 / webscrapbook

A browser extension that captures web pages to local device or backend server for future retrieval, organization, annotation, and edit. This project inherits from legacy Firefox add-on ScrapBook X.
Mozilla Public License 2.0
908 stars 121 forks source link

Preview video youtube #397

Closed leonidrysev closed 2 months ago

leonidrysev commented 2 months ago

Dear Danny! Need again ask you.

If I capture just 1 page (Depth to capture linked pages EMPTY) https://sisterproject.getcourse.ru/pl/teach/control/lesson/view?id=268586925&editMode=0

I see in data Preview video youtube image

If I capture root page (Depth to capture linked pages 1) https://sisterproject.getcourse.ru/teach/control/stream/view/id/696469686 There is no Preview video youtube in data image

danny0838 commented 2 months ago

Deep pages are captured headlessly, which works mostly like Capture source and scripts do not run. As a YouTube page requires scripts, it doesn't work well with capture source or indepth capture.

You'd have to load it in a tab to capture it. For multi-pages a workaround is to load all of them in a separated window, and select all tabs to capture all of them at once.

leonidrysev commented 2 months ago

I understand. But How can I: select all tabs to capture all of them at once ?? I opened all pages, got it, but links to the www , but not to data. Only such? image

danny0838 commented 2 months ago

Just shift/ctrl click to select tabs. Alternatively there is a Batch apture all tabs dropdown command that can be configured in the options.

If you choose to capture each tab as an item, then of course a side effect is that the linked pages are not captured.

If you really want to deeply capture multiple dynamic pages together, there are 2 advanced ways to do so:

  1. Merge capture: capture the main page with depth 0 (to build a site data; or non-depth-0 while excluding dynamic pages), and then open each page in a tab and perform a merge capture into the previously captured main page item.
  2. Tab mode for indepth capture: prepare an indepth capture with Capture as, and go to the Advanced dialog and set capture.downLink.doc.mode to tab. This will automatically open each deep page in a tab and start a capture after it completely loads. A caveat is that during the whole capture this may be very disrupting, and you have to be very carefully not to interrupt every opened tab.
leonidrysev commented 2 months ago

Could you explane: ...and perform a merge capture into the previously captured main page item.

leonidrysev commented 2 months ago

I did seconse metod - att the video. But every page in separeta folder and I links on pages to www, no to data

https://github.com/user-attachments/assets/8a44fcfc-a7c1-49d6-b444-00cc672a2074

danny0838 commented 2 months ago
  1. Read the doc for details about merge capture.
  2. In this way you should perform a depth capture for the main page that covers the linked pages (like you previously have done). Not opening all pages in tabs.
leonidrysev commented 2 months ago

I did it!) Thank you, Danny!

Noticed in some pages no preview youtube. Looked at code - there is aria-hidden="true" <div class="ytp-cued-thumbnail-overlay" **aria-hidden="true"** data-layer="4" style="">

I deleted this and preview appears. What do you think — can I corrected during capture?

image

danny0838 commented 2 months ago

You can set up a capture helper for a capture. See the tooltips in the options dialog for details.

leonidrysev commented 2 months ago

Thank you!