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

Changed headless mode to a flag instead of env variable #37

Merged
merged 2 commits into from
Oct 22, 2024

Conversation

justi-lai
Copy link
Contributor

I made headless mode into a global variable in methods.go so that the InitChromeDp() method is able to use it. If we want to protect the variable more instead of being able to just change the value at anytime, we can make it a private variable and just make a setter method.

@justi-lai
Copy link
Contributor Author

Also in the methods.go file, when I forked it for some reason it was importing strconv but it's never used so it errors out. For my own testing I just commented it out but I left it in for the merge in case it's something that is necessary.

utils/methods.go Show resolved Hide resolved
@jpahm jpahm merged commit 42856b7 into UTDNebula:develop Oct 22, 2024
2 checks passed
@@ -20,7 +20,7 @@ import (
func ScrapeCoursebook(term string, startPrefix string, outDir string) {

// Load env vars
if err := godotenv.Load(); err != nil {
if err := godotenv.Load(".env.template"); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is actually an error here I noticed after-the-fact (which I've fixed via da5bab6); this shouldn't be changed to read from .env.template since the template file is only used as a basis for creating an actual .env file (which is what this loads from by default)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants