lwthiker / curl-impersonate

curl-impersonate: A special build of curl that can impersonate Chrome & Firefox
MIT License
3.77k stars 248 forks source link

add available browsers as json file #74

Closed vladtreny closed 2 years ago

vladtreny commented 2 years ago

Hello, is it possible to create a json file where list all available browsers and current docker image

like

{
'docker': 'lwthiker/curl-impersonate:0.4',
'browsers': {
    'chrome98': 'chrome',
    'chrome99': 'chrome',
    'edge98': 'chrome',
    'edge99': 'chrome',

    'safari15_3': 'chrome',

    'ff91esr': 'ff',
    'ff95': 'ff',
    'ff98': 'ff'
}
}

Of course can add more details to each browser

lwthiker commented 2 years ago

Hi,

As for the docker image - I'm not sure whether maintaining the last docker version in a file in the repo is the best idea. These things tends to go out of sync. If you are looking for a method to obtain the latest image, you can check the latest git tag, and the version of the docker image should match the version in git. Or, you can pull the latest tag (which currently points to the Firefox version by default).

As for the list of browsers - yes it makes sense indeed to maintain such a list as part of the project. Can I ask what would be your use of such a list?

vladtreny commented 2 years ago

For automation. Now need to check manually the new versions of docker and browsers. But could just load this json from your repo and auto-update software on fly. I use random browsers, just shuffle the list

lwthiker commented 2 years ago

I added a JSON file as you suggested, with a slightly different format. It is available as browsers.json in the top dir.

vladtreny commented 2 years ago

great. it is possible to add these also a current docker version? like. docker_version: 0.5