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

Screencapture only works if url is https #32

Closed
paceaux opened this issue Oct 18, 2023 · 2 comments
Closed

Screencapture only works if url is https #32

paceaux opened this issue Oct 18, 2023 · 2 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@paceaux
Copy link
Owner

paceaux commented Oct 18, 2023

When passing these parameters:

-u https://frankmtaylor.com/sitemap.xml -s h1 -e -c

Images are not created.

In the frankmtaylor.com.sitemap.json file, the urls are all http:

{
    "loc": "http://frankmtaylor.com/401.html"
  },
  {
    "loc": "http://frankmtaylor.com/403.html"
  },
  {
    "loc": "http://frankmtaylor.com/500.html"
  },

If these urls are set to https, then screengrabs are produced.

Solution

in selector-finder.js, the filename is created with a simple replace, and it assumes https:

.replace('https://', '')

Change that to

        .replace(/http(s?)(:\/\/)/, '')

and that should cover both cases.

@paceaux paceaux self-assigned this Oct 18, 2023
@paceaux paceaux added bug Something isn't working good first issue Good for newcomers labels Oct 18, 2023
@paceaux paceaux assigned paceaux and unassigned paceaux Oct 18, 2023
@paceaux
Copy link
Owner Author

paceaux commented Oct 24, 2023

this is merged into develop

@paceaux
Copy link
Owner Author

paceaux commented Oct 24, 2023

This was resolved in release 2.2

@paceaux paceaux closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant