Giter Club home page Giter Club logo

Comments (8)

oyvindeh avatar oyvindeh commented on August 20, 2024

Thanks for the bug report, and sorry for the slow response. I will look into this as soon I get the chance, but I can not make any promises about when.

from ucss.

oyvindeh avatar oyvindeh commented on August 20, 2024

I've finally been able to have a look at this; sorry that it took so long!

From what I understand, you expect the crawler to go beyond the domain to crawl. But it should never do this: Links to e.g. YouTube will never be followed. This is because your CSS is not relevant for YouTube.

Thus, the links you have in pages.exclude are not needed: pages.exclude is only for pages on your crawled domain that is to be skipped by the crawler.

Let me know if I've misunderstood. Also, if you have suggestions for how to make the documentation/example clearer, please let me know.

from ucss.

ghostrydr avatar ghostrydr commented on August 20, 2024

Here's some sample output from using this command ucss -h http://www.shaw.ca -c http://www.shaw.ca/uploadedfiles/ecomm/css/shaw-min.css

image

image

As you can see it's crawling subdomains (would like to disable that as they are entirely separate sites) as well as Facebook, YouTube and iTunes.

Using just ucss with essentially the same config as above does produce output although it doesn't appear to crawl beyond the specified page. It's flagging styles that I know for sure are used on other pages (315 used, 3352 unused?... nope!)

from ucss.

oyvindeh avatar oyvindeh commented on August 20, 2024

Thanks, I can reproduce this. I will try to look into it when I'm back from vacation next week.

from ucss.

oyvindeh avatar oyvindeh commented on August 20, 2024

Seems like there may be two separate issues:

  • Sometimes, pages outside of given domain is visited by crawler.
  • The used selectors count seems too low for the specified page. This may indicate that not all pages are visited.

I think I've fixed the first issue (in a separate branch, 82b6678). It was caused by protocol relative URIs (e.g. "//newsroom.shaw.ca/") being handled as domain relative URLs, which is clearly wrong.

As for the second issue: I ran ucss towards your site and got the following (both with config and from command line):

3674 (1303 used, 2364 unused, 304 duplicates, 2 ignored)

This is a higher number of used selectors than you got. Does it seem correct?

(Btw, it seems like you have a broken link somewhere, pointing to hhttps://www.shaw.ca/store/cart/orderLeadForm2.jsp)

from ucss.

ghostrydr avatar ghostrydr commented on August 20, 2024

There's a good possibility that those results are more accurate. We still have a legacy stylesheet that's still in use (which is the root of this ol' project of mine). I'll take a closer look when I have some time (hopefully next week).

Thanks for pointing out the broken link. I'm surprised our marketing dept. hasn't pointed that out yet... lol

from ucss.

oyvindeh avatar oyvindeh commented on August 20, 2024

Great! I will try to integrate and launch the changes mid next week, when I am back from travel. Until then, please use the branch mentioned above.

from ucss.

oyvindeh avatar oyvindeh commented on August 20, 2024

I've integrated and released this now. Very sorry that it took longer than expected.

from ucss.

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.