kathawala / RewardsBot

Free Bing Rewards automator built in python using selenium web driver.
GNU General Public License v2.0
14 stars 4 forks source link

Not really an issue.. but.. #4

Closed ShoGinn closed 2 years ago

ShoGinn commented 6 years ago

I piloted your code a bit and was curious if you ever thought of doing this in a docker type selenium web driver model? This would solve your problem with cross-platform and cross-browser if you just use the native grid stuff.

Just a thought.

Right now im running it in https://github.com/fcwu/docker-ubuntu-vnc-desktop

works flawless ;)

ShoGinn commented 6 years ago

So I decided rather than be lazy, to take your hard work and hack at it.

You already did all the selenium coding.

Just changing the driver makes it work using the selenium node/hub.

check out my fork if you are curious.

kathawala commented 6 years ago

I checked out your fork, and it's really cool! I'm glad you've done some things off the todo list (adding config etc).

I am testing out the repo with the docker stuff right now. Will let you know my thoughts after trying it out.

In the meanwhile, are you interested in merging your contributions back to the main repo? I saw you opened a pull request but then closed it. I'll gladly pull it in if everything works all right after I test it out.

ShoGinn commented 6 years ago

Its still a work in progress ;) can't seem to get it to always register as mobile..

I really want to get rid of the dictionary and have it take the history into account.

There is another bingrewards bot that I am using as a reference, but my python coding skill are a hack job at best.

kathawala commented 6 years ago

Okay, this was my first time using Docker but it was pretty sweet! Surprised at how painless everything was!

By "taking history into account" do you mean that a user should not accidentally search for the same thing twice in one day? One week? Or am I understanding this wrong? If I am getting it right, I can work on updating that.

I am also wondering how to debug this thing. I'd like if I could vnc (or anything else) into the container from my browser (like in the link you first shared), not sure how to do that though...

Your python skills seem great, as far as I'm concerned :)

ShoGinn commented 6 years ago

Awesome!

So debugging it is easy,

--- 
version: "2.2"
services: 

  selenium-hub:
    image: selenium/hub
    ports:
    - 4444:4444
    healthcheck:
      test: ["CMD", "wget", "--spider", "http://localhost:4444/grid/api/proxy"] 
      interval: 10s
      timeout: 5s
      retries: 3
  chrome:
    image: selenium/node-chrome-debug
    ports:
      - 5901:5900
    healthcheck:
      test: ["CMD", "wget", "--spider", "http://localhost:5555"]
      interval: 10s
      timeout: 5s
      retries: 3
    depends_on: 
      selenium-hub: 
        condition: service_healthy
    links:
      - selenium-hub:hub
    environment:
      - HUB_PORT_4444_TCP_ADDR=hub
      - HUB_PORT_4444_TCP_PORT=4444
    volumes:
      - /dev/shm:/dev/shm # Mitigates the Chromium issue described at https://code.google.com/p/chromium/issues/detail?id=519952

then just VNC to 5901 (pw secret)

Then just

docker run -it --rm rewardsbot bash

then you can have your own private session ;)

This is assuming you've built the image already.

ShoGinn commented 6 years ago

But as for the history stuff.

I think we need to figure out how to use a better query mechanism.

https://github.com/sealemar/BingRewards

has a full spectrum system, but his script doesn't work for me anymore and I don't know why!

kathawala commented 6 years ago

Cool, I will try out the debug version you posted and get back to you.

I like the query mechanisms you're pointing out, but I also like the idea of different users having different queries (which having a dictionary of query terms accomplishes). If all the users use a query generator based on Google Trends, they will all stand out easily. Possible solution might be to add in Google Trends queries to the queries included in queries every time the script is run and then just ensure that we aren't repeating search terms? I will work on that.

kathawala commented 6 years ago

Okay, the debugging works! Thanks for that.

The WebDriverWait calls don't seem to work (which is why I never ended up using them), and so quizzes and special point offers aren't being done. But other than that, it's flawless! Really impressed :)

ShoGinn commented 6 years ago

I modified the code last night to fix that ;)

ShoGinn commented 6 years ago

Here is another thought... reddit has a microsoft rewards group. They basically post the extra points e-mails that they send out. I might make an "extra URL" file that can be an option. It would then add to the config file all the url's that has been clicked for that user in the config file. (thats my thought, im sure there is a better option) https://www.reddit.com/r/MicrosoftRewards/

check it out ;)

Brenex commented 6 years ago

Hey, just found out about this project! Sound's very exciting! I'm looking forward to being able to run it on windows :)

Brenex commented 6 years ago

Shoginn what happened to your fork?