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

Data Driven #74

Closed
KryptoNova opened this issue Apr 26, 2019 · 5 comments
Closed

Data Driven #74

KryptoNova opened this issue Apr 26, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@KryptoNova
Copy link
Collaborator

Create a data system that will allow gg to be a little more selective in what pages it navigates into.

  1. The URL of the sweep will be tracked.
  2. The status of what happened with the sweep will be tracked. The statuses below will be implemented: Won, Lost, Already Entered, Is Black Listed, Giveaway Has Ended
  3. The Date and Time of when the sweep was started.
  4. The number of winners that can win before sweep is over.
  5. The retail value of the sweep.
  6. The Date and Time of when the sweep will end.
  7. Win or Lost Date and Time

Most likely this will be an SQLite3 database. Infrastructure will be built so that DDL modifications can be rolled out as changes to Tables and Fields need to be introduced. The version that is stored in the database will be utilized to determine what modifications are needed for DDL processing on subsequent releases.

@KryptoNova KryptoNova added the enhancement New feature or request label Apr 26, 2019
@KryptoNova KryptoNova self-assigned this Apr 26, 2019
@KryptoNova KryptoNova added this to the V3 milestone Apr 26, 2019
@KryptoNova KryptoNova moved this from To do to In progress in V3 and beyond priority list Apr 27, 2019
@KryptoNova
Copy link
Collaborator Author

TODO: Store URLs for winning sweeps. Then when GG is restarted and it has been less than 24 hours since a winner has been found, gg will dump out the winning URL lists before starting to navigate the Giveaway site.

@KryptoNova
Copy link
Collaborator Author

The storing of the winning URLs will be done under a different enhancement. Also, the amount of data will not be tracked as thought. Time did not permit.

rinoma added a commit to rinoma/giveaway-grabber that referenced this issue Jun 4, 2019
Apologies if this PR is a duplicate of jpchip#80 but I was not sure if the requested changes would be made after a month. Couldn't contribut to Kyptonova's branch due to restrictions. The original PR was good, but made changes according to the reviews and used some more ES7 syntax.
From the original PR:
Creates a database for tracking sweepstakes entries. After sweepstakes are entered, it will skip checking it in the future. This will prevent unnecessary hops between the main screen and individual sweepstakes. The thought being that this will cut down on login page requests and CAPTCHAs.
Addresses jpchip#74.
@rinoma rinoma mentioned this issue Jun 4, 2019
@KryptoNova
Copy link
Collaborator Author

It looks like the sql injection concerns from the pulk request weren't as important as originally thought since @rinoma pretty much packaged up what my original pull request was and submitted it again. So at this point it only makes sense to close this issue as I really didn't jave to do the sql injenction protection in the first place. :-(

@jpchip
Copy link
Owner

jpchip commented Jun 10, 2019

He actually did fix the sql injection issues

'INSERT INTO GG_DATA (sweepURL, processCode) VALUES (?, ?)',

He's using the built in db functions to replace the question marks with the parameters, thus they get properly escaped.

Anyways, I really appreciate the work you put in on this! It is laying the groundwork for exciting future enhancements. Having a db leads to lots of cool potential features, and I'd love to see any ideas you might have!

@KryptoNova
Copy link
Collaborator Author

Oh. I misunderstood what your requirments from all the suggestions you uad placed on my original pull request. I thought you wanted prepared statements to be used. Those don't play well with the async/await programming. I was setting up to use async.js with lots of callbacks to make prepared statements work.

If I would have known all I needed to do was parameters then it would have been done the next day. Oops, my mistake.

I will look in from time to time, but my free time in the evenings has evaporated. Work is picking up now. It may slow down in a couple of months.

@KryptoNova KryptoNova moved this from In progress to Done in V3 and beyond priority list Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants