Yudaotor / EsportsHelper

通过selenium模拟浏览器来自动观看电竞比赛获取电竞典藏罐,当没有比赛时智能休眠.(Automatically watch e-sports games through undetected_chromedriver to farm esports capsule, when there is no match intelligent sleep.)
MIT License
201 stars 20 forks source link

feature request: support ungoogled-chromium for docker version #110

Closed zzz6839 closed 9 months ago

zzz6839 commented 9 months ago

@RedrootDEV

I believe it's possible to chain ungoogled chromium with EsportsHelper to run this script on headless mode in docker, therefore saving more resources.

https://github.com/ungoogled-software/ungoogled-chromium https://github.com/ich777/docker-ungoogled-chromium

One of the down side for using google-chromium in docker is the profile path isn't fixed, you have to login first(security alert!), and sometimes google will block the login. image However, with ungoogled-chromium, you have a fixed local profile path(without login of course!). image Combine the userDataDir and ChromePath function from EsportsHelper, in initial setup, run docker compose run with config file set toheadless:false, insert username and password manually and tick "stay signed in". After a successful login, ctrl+C, then turn on headless, save the config file, now docker compose up -d, u now have a headless docker version EsportsHelper.

I have verified EsportsHelper works with ungoogled-chromium in windows version.

I hope this idea could help u.

RedrootDEV commented 9 months ago

@RedrootDEV

I believe it's possible to chain ungoogled chromium with EsportsHelper to run this script on headless mode in docker, therefore saving more resources.

https://github.com/ungoogled-software/ungoogled-chromium https://github.com/ich777/docker-ungoogled-chromium

One of the down side for using google-chromium in docker is the profile path isn't fixed, you have to login first(security alert!), and sometimes google will block the login. image However, with ungoogled-chromium, you have a fixed local profile path(without login of course!). image Combine the userDataDir and ChromePath function from EsportsHelper, in initial setup, run docker compose run with config file set toheadless:false, insert username and password manually and tick "stay signed in". After a successful login, ctrl+C, then turn on headless, save the config file, now docker compose up -d, u now have a headless docker version EsportsHelper.

I have verified EsportsHelper works with ungoogled-chromium in windows version.

I hope this idea could help u.

I like your idea, I will try to apply it!! The challenge is that the image needs to work for both ARM64 and AMD64 since Ungoogled Chromium binaries are specific to each architecture. I'd rather not have to maintain two versions of the image (one for each architecture).

zzz6839 commented 9 months ago

@RedrootDEV I believe it's possible to chain ungoogled chromium with EsportsHelper to run this script on headless mode in docker, therefore saving more resources. https://github.com/ungoogled-software/ungoogled-chromium https://github.com/ich777/docker-ungoogled-chromium One of the down side for using google-chromium in docker is the profile path isn't fixed, you have to login first(security alert!), and sometimes google will block the login. image However, with ungoogled-chromium, you have a fixed local profile path(without login of course!). image Combine the userDataDir and ChromePath function from EsportsHelper, in initial setup, run docker compose run with config file set toheadless:false, insert username and password manually and tick "stay signed in". After a successful login, ctrl+C, then turn on headless, save the config file, now docker compose up -d, u now have a headless docker version EsportsHelper. I have verified EsportsHelper works with ungoogled-chromium in windows version. I hope this idea could help u.

I like your idea, I will try to apply it!! The challenge is that the image needs to work for both ARM64 and AMD64 since Ungoogled Chromium binaries are specific to each architecture. I'd rather not have to maintain two versions of the image (one for each architecture).

No worries, no maintainence is required, I have forked this repo and new docker image will be generated upon new pushes from upstream(or trigger it manually), I havent PR my part to the upstream due to the usage of repo secrets.

https://hub.docker.com/r/zzz6839/esportshelper https://github.com/zzz6839/EsportsHelper

For now I just need someone to test out weather my docker images could work for arm64.

zzz6839 commented 9 months ago

close as the new headless login method look promising, Userdata method is no longer necessary,hence no need to support new browser.

4af53c54871153cb1482e5c9c1e282be4044faca