Git Product home page Git Product logo

Comments (6)

up209d avatar up209d commented on June 3, 2024

@captaindavepdx Hey mate, thank for using the ext, I thought that I fixed this issue, could you provide the version you are using? 0.1.8? It is a little bit hard to debug without a real test case. But here is the thing that I downloaded from Donald Trump Twitter, I think the HTML file is pretty fine.

Screen Shot 2019-06-12 at 8 25 09 pm

from resourcessaverext.

david-littlefield avatar david-littlefield commented on June 3, 2024

@up209d, Hey man, thanks for the quick reply. Yes, I'm using version 0.1.8. I forgot to mention that I'm calling a custom script to scroll to the absolute bottom of the page. Could that make the difference?

  • scrollHeight could be 400,000+
  • staticResources could be a few thousand
var start = false;
var running = false;
var lastScrollY = 0;

function scroll(retryAttempt) {
    
    if (running == false && retryAttempt < 10) {
        running = true;
        
        window.scrollBy(0, 500);
        
        if (window.scrollY != lastScrollY) {
            lastScrollY = window.scrollY;
            window.scrollBy(0, 1000);
            setTimeout(function() {
                       running = false;
                       scroll(0);
                       }, 1000);
        } else {
            setTimeout(function() {
                       running = false;
                       scroll(retryAttempt + 1)
                       }, 1000);
        }
    } else {
        postMessage();
        return;
    }
}

if (start == false) {
    start = true;
    scroll(0);
}

Update:
I tested UP without any custom scripts, and the html file downloaded successfully. Again, great work!

  • When viewed, the layout looked identical to the original site.
  • The links were separate from the downloaded folder structure.

Screen Shot 2019-06-12 at 8 43 07 AM

  • Added a base url <base href="http://twitter.com/">. The links worked, but it didn't utilize your awesome downloaded resources.

Screen Shot 2019-06-12 at 8 59 49 AM

  • The images appeared to load from the original source, instead of the downloaded folder structure.

Screen Shot 2019-06-12 at 9 04 35 AM

  • The embedded videos displayed an error message when clicked

Screen Shot 2019-06-12 at 8 33 32 AM

Question:
Is it possible to link the html file to your downloaded resources? Including videos?

from resourcessaverext.

up209d avatar up209d commented on June 3, 2024

@captaindavepdx Ah I got what you mean now, it is more complicated to do that. That’s why I defined the extension is a downloading resources tool but not the website downloading tool. Its purpose is naive and simple that get everything from the source 1 to 1 greedily without any modification. Cooking the html content to serve everything locally is much harder than what the extension is capable for at the moment. Maybe you can try to create http-server on the local folders and map the localhost to the desired domain eg twitter.com. But again it is not quite a sweet solution.

from resourcessaverext.

david-littlefield avatar david-littlefield commented on June 3, 2024

Right on, good to know, thanks @up209d!

Would an html file with a large scrollHeight still be within the scope of your extension?

Update:
I've started to piece together a website downloader. If I figure out a simple way to connect the links, I'll post the solution. I think it'd be awesome if your extension could all of that!

from resourcessaverext.

up209d avatar up209d commented on June 3, 2024

@captaindavepdx In term of a long scrollHeight, I think you are doing correctly, because all assets downloading are triggered by browser itself, so we have to scroll down to make sure browser can load those hidden assets.

from resourcessaverext.

david-littlefield avatar david-littlefield commented on June 3, 2024

@up209d Right on, I'll post progress updates regarding the connected links. If you have any suggestions, let me know.

from resourcessaverext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.