Git Product home page Git Product logo

microsoft-rewards-farmer's Introduction

๐Ÿ‘‹ Hi, it's Charles

A Full Stack Developer & Python Programmer, I am truely openminded for all programation languages, but I love breaking securities !

โœ‰๏ธ Contact Me

(()=>{
  console.log(
    "Oops, you are once again pwned!"
  );
})();

๐Ÿ“ˆ Quick Stats

My stats Most Used Languages

microsoft-rewards-farmer's People

Contributors

charlesbel avatar eltociear avatar haobinliang avatar maskboyz avatar mixingsneax avatar nicoacu avatar njhughessas avatar omarwastaken avatar shinji257 avatar shoginn avatar udu3324 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microsoft-rewards-farmer's Issues

Not finding css elements

My bot has had some issues finding css elements for buttons

DevTools listening on ws://127.0.0.1:51992/devtools/browser/9e758f92-490e-417e-809d-8f025439ec09 [8104:8312:1110/094620.890:ERROR:display_layout.cc(562)] PlacementList must be sorted by first 8 bits of display_id [5508:8944:1110/094645.061:ERROR:ssl_client_socket_impl.cc(960)] handshake failed; returned -1, SSL error code 1, net_error -101 Traceback (most recent call last): File "C:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer.py", line 299, in <module> completeDailySet(browser) File "C:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer.py", line 191, in completeDailySet completeDailySetSurvey(browser, cardNumber) File "C:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer.py", line 137, in completeDailySetSurvey browser.find_element_by_id("btoption" + str(random.randint(0, 1))).click() File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 344, in find_element_by_id return self.find_element(by=By.ID, value=id_) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="btoption0"]"} (Session info: chrome=86.0.4240.193)

Headless Mode

Hi,

How do you enable headless mode? I tried changing it to True (line 28) in the .py, but the Chrome browser still opens.

Thanks!

[Question] Cron Job schduling

I cannot seem to get cronjob scheduling working with chromedriver.
I don't see any obvious errors in the syslog.
here is my cron job setup
00 10 * * * python3 /path/to/rewards/farmer.py >> /home/log/rbots.txt
I have also tried
00 10 * * * export DISPLAY=:0; python3 /path/to/rewards/farmer.py >> /home/log/rbots.txt
here is my log output
https://gist.github.com/njhughesSAS/d5362ae29c0dae2c7e10c8808713cde8
does anyone have cron working with chromedriver

script.py closes instantly

I edited script.py with my account details and installed selenium.
When I start script.py it will show up just for less than a second and it is closed.

NoSuchElementException error

DevTools listening on ws://127.0.0.1:51248/devtools/browser/119322a7-0111-4a05-a64c-5a90a11c3894
[LOGIN] Logging-in...
[LOGIN] Writing email...
[LOGIN] Writing password...
[LOGIN] Passing security checks...
[LOGIN] Logged-in !
[LOGIN] Ensuring login on Bing...
[LOGIN] Logged-in successfully !
[POINTS] You have 19583 points on your account !
[DAILY SET] Trying to complete the Daily Set...
[DAILY SET] Completing quiz of card 2
Traceback (most recent call last):
File "Z:\Users\rapha\Desktop\ms_rewards_farmer.py", line 604, in
completeDailySet(browser)
File "Z:\Users\rapha\Desktop\ms_rewards_farmer.py", line 398, in completeDailySet
completeDailySetQuiz(browser, cardNumber, 3)
File "Z:\Users\rapha\Desktop\ms_rewards_farmer.py", line 276, in completeDailySetQuiz
browser.find_element_by_xpath('//[@id="rqStartQuiz"]').click()
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//
[@id="rqStartQuiz"]"}
(Session info: headless chrome=87.0.4280.88)

Searches

My bing searches are taking a very long time between searches, up to 15 minutes in-between searches in some cases. I get you don't want them machine gunned, but this seems excessive.

ModuleNotFoundError: No module named 'ipapi

I ran pip install -r requirements.txt and then python3 ms_rewards_farmer.py and got the following error:

Traceback (most recent call last):
  File "ms_rewards_farmer.py", line 7, in <module>
    import ipapi
ModuleNotFoundError: No module named 'ipapi'

I have ipapi installed (per requirements.txt) and haven't used it much but looks like it's deprecated in favor of Ipython.core.ipapi...


Raspberry Pi 3 Model B Plus Rev 1.3p running Raspbian GNU/Linux 10 (buster)

[BUG]Bot Stuck on this or that

Looks like we are hanging on the 9th question for this or that is you manually answer does move on eventually but leaves the next quiz on screen while it does the searches.
image

Bot gets stuck on More Promotions and just hangs there.

[LOGIN] Logging-in...
[LOGIN] Writing email...
[LOGIN] Writing password...
[LOGIN] Passing security checks...
[LOGIN] Logged-in !
[LOGIN] Ensuring login on Bing...
โ†[92m[LOGIN] Logged-in successfully !โ†[00m
โ†[92m[POINTS] You have 3230 points on your account !โ†[00m
[DAILY SET] Trying to complete the Daily Set...
[DAILY SET] Completing search of card 1
[DAILY SET] Completing quiz of card 2
[DAILY SET] Completing poll of card 3
โ†[92m[DAILY SET] Completed the Daily Set successfully !โ†[00m
[PUNCH CARDS] Trying to complete the Punch Cards...
โ†[92m[PUNCH CARDS] Completed the Punch Cards successfully !โ†[00m
[MORE PROMO] Trying to complete More Promotions...

For just one of my accounts, It will start the normal process but gets stuck on the [MORE PROMO] part and when I try to ctrl c out of it, it will spit out the errors and then just close the CMD window on its own.

[BUG] Closes when run

Error Log
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\socket.py", line 953, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 353, in connect
conn = self._new_conn()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x000002418C527F40>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\retry.py", line 573, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ipapi.co', port=443): Max retries exceeded with url: /json/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002418C527F40>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\Microsoft-Rewards-Farmer-master(1)\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 724, in
LANG, GEO, TZ = getCCodeLangAndOffset()
File "C:\Users\Administrator\Downloads\Microsoft-Rewards-Farmer-master(1)\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 160, in getCCodeLangAndOffset
nfo = ipapi.location()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\ipapi\ipapi.py", line 76, in location
resp = get(url, headers=headers, **options)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ipapi.co', port=443): Max retries exceeded with url: /json/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002418C527F40>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))

Screenshot of the page
There is no screenshot since it closes almost instantly, but I have run it in IDLE, that's where I got the error above, if you would like I can provide a screenshot of that.

Source code of dashboard
Copy the source code of the Microsoft Rewards Dashboard Page and paste it on Gist. Then share the link of the gist here.
Not sure how to do this step

Btw yes, all the requirements have been installed, Chrome is up to date same as the chromedriver

[BUG]

Error Log
[LOGIN] Logging-in...
[LOGIN] Writing email...
[LOGIN] Writing password...
[LOGIN] Passing security checks...
[LOGIN] Logged-in !
[LOGIN] Ensuring login on Bing...
[LOGIN] Logged-in successfully !
[POINTS] You have 170 points on your account !
[DAILY SET] Trying to complete the Daily Set...
[DAILY SET] Completed the Daily Set successfully !
[PUNCH CARDS] Trying to complete the Punch Cards...
[PUNCH CARDS] Completed the Punch Cards successfully !
[MORE PROMO] Trying to complete More Promotions...
[MORE PROMO] Completed More Promotions successfully !
Traceback (most recent call last):
File "ms_rewards_farmer.py", line 751, in
remainingSearches, remainingSearchesM = getRemainingSearches(browser)
File "ms_rewards_farmer.py", line 690, in getRemainingSearches
progressDesktop = counters['pcSearch'][0]['pointProgress'] + counters['pcSearch'][1]['pointProgress']
KeyError: 'pcSearch'

Source code of dashboard
https://gist.github.com/darkspecs/5b8c064bad6991f9830a14117365e587

[BUG] Ensuring Login on Bing...

Error Log
DevTools listening on ws://127.0.0.1:5354/devtools/browser/47b50c74-cf54-4f0a-876d-13aa79101b15
[LOGIN] Logging-in...
[LOGIN] Writing email...
[LOGIN] Writing password...
[LOGIN] Passing security checks...
[LOGIN] Logged-in !
[LOGIN] Ensuring login on Bing...
Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.
Python runtime state: initialized

Current thread 0x00003a3c (most recent call first):
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\utils.py", line 57 in _has_surrogates
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email_policybase.py", line 287 in _sanitize_header
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email_policybase.py", line 316 in header_fetch_parse
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\message.py", line 471 in get
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\message.py", line 578 in get_content_type
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\message.py", line 594 in get_content_maintype
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\feedparser.py", line 295 in _parsegen
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\feedparser.py", line 180 in _call_parse
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\feedparser.py", line 176 in feed
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\parser.py", line 56 in parse
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\email\parser.py", line 67 in parsestr
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 225 in parse_headers
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 331 in begin
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\http\client.py", line 1347 in getresponse
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 440 in _make_request
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 699 in urlopen
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\poolmanager.py", line 375 in urlopen
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\request.py", line 170 in request_encode_body
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\request.py", line 78 in request
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397 in _request
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374 in execute
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319 in execute
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976 in find_element
File "C:\Users\EzzY\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 360 in find_element_by_id
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 96 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
File "D:\EzzY\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 149 in checkBingLogin
...

Screenshot of the page
No browserwindow is ever opened

Source code of dashboard
No browser window to copy source code from

I am new to python and all that follows, but I am trying to learn what I can. This is probably an user error, but I will post here to see if it can be solved.

I encounter an issue where "Ensuring Login on Bing..." probably takes well over an hour plus, and I find this error log when I come back to the computer later in the day, or the morning after.
I have double checked my login information and the chromedriver version against my chrome install version.
Chrome: 88.0.4324.104 64-bit
ChromeDriver 88.0.4324.96 (Downloaded and placed C:\Windows\chromedriver.exe)
MS Farmer version 1.1
When I start ms_rewards_farmer.py only a window showing the python console appears, no browser window of any browser pops up, which I assume it should.

EDIT: Spelling correction

[BUG] Connection refused

MAKE SURE THE ERROR IS NOT FROM YOU, THIS IS THE MOST FREQUENT CASE
hi . i triyed with 2 system
Error Log
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f122ac38a00>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ipapi.co', port=443): Max retries exceeded with url: /json/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f122ac38a00>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "ms_rewards_farmer.py", line 724, in
LANG, GEO, TZ = getCCodeLangAndOffset()
File "ms_rewards_farmer.py", line 160, in getCCodeLangAndOffset
nfo = ipapi.location()
File "/usr/local/lib/python3.8/dist-packages/ipapi/ipapi.py", line 76, in location
resp = get(url, headers=headers, **options)
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ipapi.co', port=443): Max retries exceeded with url: /json/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f122ac38a00>: Failed to establish a new connection: [Errno 111] Connection refused'))

Screenshot of the page
Screenshot from 2021-03-30 07-41-43
Screenshot from 2021-03-30 07-48-26

Source code of dashboard
Copy the source code of the Microsoft Rewards Dashboard Page and paste it on Gist. Then share me the link of the gist here.

Name ipapi isn't defined

Traceback (most recent call last):
File "C:\Users\XXX\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 723, in
LANG, GEO, TZ = getCCodeLangAndOffset()
File "C:\Users\XXX\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 159, in getCCodeLangAndOffset
nfo = ipapi.location()
NameError: name 'ipapi' is not defined

[BUG]

Traceback (most recent call last):
File "C:\Users\Jose Moreira\Desktop\Essenciais\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 748, in
remainingSearches, remainingSearchesM = getRemainingSearches(browser)
File "C:\Users\Jose Moreira\Desktop\Essenciais\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 687, in getRemainingSearches
progressDesktop = counters['pcSearch'][0]['pointProgress'] + counters['pcSearch'][1]['pointProgress']
KeyError: 'pcSearch'

Headless true Attribute error

This error is produced with headless enabled

DevTools listening on ws://127.0.0.1:53160/devtools/browser/44e64fc2-aaaf-4fc0-a6c7-cf43538c9b67 [13748:8324:1119/071644.574:ERROR:display_layout.cc(562)] PlacementList must be sorted by first 8 bits of display_id PS C:\Users\User> & C:/Users/User/AppData/Local/Programs/Python/Python39/python.exe c:/Users/User/Documents/Microsoft-Rewards-Farmer-master/farmer_test.py Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer_test.py", line 354, in <module> browser = browserSetup(True, PC_USER_AGENT) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer_test.py", line 37, in browserSetup options.headless = True AttributeError: can't set attribute

The following is the Error from running headless false
Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 351, in <module> login(browser, account['username'], account['password']) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 64, in login waitUntilVisible(browser, By.ID, 'KmsiCheckboxField', 10) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 92, in waitUntilVisible WebDriverWait(browser, time_to_wait).until(ec.visibility_of_element_located((by_, selector))) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:

Too many searches[BUG]

For some reason, the program is trying to do way too many searches. As you can see in the picture, it has done all the desktop searches already but is still only on 40/210. This means it takes ages to finish.

Error Log
DevTools listening on ws://127.0.0.1:56383/devtools/browser/54ddae38-3812-4919-9183-54eb7a071fc1
[LOGIN] Logging-in...
[LOGIN] Writing email...
[LOGIN] Writing password...
[LOGIN] Passing security checks...
[LOGIN] Logged-in !
[LOGIN] Ensuring login on Bing...
โ†[92m[LOGIN] Logged-in successfully !โ†[00m
โ†[92m[POINTS] You have 34288 points on your account !โ†[00m
[DAILY SET] Trying to complete the Daily Set...
โ†[92m[DAILY SET] Completed the Daily Set successfully !โ†[00m
[PUNCH CARDS] Trying to complete the Punch Cards...
โ†[92m[PUNCH CARDS] Completed the Punch Cards successfully !โ†[00m
[MORE PROMO] Trying to complete More Promotions...
โ†[92m[MORE PROMO] Completed More Promotions successfully !โ†[00m
[BING] Starting Desktop and Edge Bing searches...
[BING] 1/210
[BING] 2/210
[BING] 3/210
[BING] 4/210
[BING] 5/210
[BING] 6/210
[BING] 7/210
[BING] 8/210
[BING] 9/210
[BING] 10/210
[BING] 11/210
[BING] 12/210
[BING] 13/210
[BING] 14/210
[BING] 15/210
[BING] 16/210
[BING] 17/210
[BING] 18/210
[BING] 19/210
[BING] 20/210
[BING] 21/210
[BING] 22/210
[BING] 23/210
[BING] 24/210
[BING] 25/210
[BING] 26/210
[BING] 27/210
[BING] 28/210
[BING] 29/210
[BING] 30/210
[BING] 31/210
[BING] 32/210
[BING] 33/210
[BING] 34/210
[BING] 35/210
[BING] 36/210
[BING] 37/210
[BING] 38/210
[BING] 39/210
[BING] 40/210
[BING] 41/210
[BING] 42/210
[BING] 43/210
[BING] 44/210
[BING] 45/210
etc
Screenshot of the page
Capture1

Source code of dashboard
https://gist.github.com/raphalation/b409ac17c1366789daa843aff62d9801

Cant find element

DevTools listening on ws://127.0.0.1:22319/devtools/browser/372f3220-26db-4a7f-81b1-e5572ee20102 [4612:6160:1120/105556.392:ERROR:display_layout.cc(562)] PlacementList must be sorted by first 8 bits of display_id [4612:6160:1120/105557.576:ERROR:device_event_log_impl.cc(211)] [10:55:57.575] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [4612:6160:1120/105557.577:ERROR:device_event_log_impl.cc(211)] [10:55:57.577] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [4612:6160:1120/105724.379:ERROR:display_layout.cc(562)] PlacementList must be sorted by first 8 bits of display_id Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 370, in <module> completeDailySet(browser) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 260, in completeDailySet completeDailySetTrueOrFalse(browser, cardNumber) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 213, in completeDailySetTrueOrFalse browser.find_element_by_xpath('//*[@id="rqStartQuiz"]').click() File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 368, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="rqStartQuiz"]"} (Session info: chrome=87.0.4280.66)

here is the source
https://gist.github.com/njhughesSAS/59c68eaa928da4a902572571da0df5c3

[BUG]

Error Log
[DAILY SET] Trying to complete the Daily Set...
Traceback (most recent call last):
File "ms_rewards_farmer.py", line 752, in
completeDailySet(browser)
File "ms_rewards_farmer.py", line 451, in completeDailySet
d = getDashboardData(browser)['dailySetPromotions']
File "ms_rewards_farmer.py", line 447, in getDashboardData
dashboard = json.loads(dashboard)
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Screenshot of the page
https://i.imgur.com/Cgf0oYb.png
https://i.imgur.com/jACWib3.png

https://i.imgur.com/nAhneVC.png
https://i.imgur.com/ch58bae.png

Location Is US

Crashes right after starting

It's too fast for me to take a screenshot of the rest but this is what I was able to get
image
I'm not sure how to fix that warning since I already had most of the requirements installed from other bots I've tried

A,B, or C error

Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 574, in <module> completeMorePromotions(browser) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 521, in completeMorePromotions completeMorePromotionABC(browser, i, 3) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 465, in completeMorePromotionABC browser.find_element_by_xpath("document.evaluate(\"//*[@id=\"QuestionPane" + str(question) + "\"]/div[1]/div[2]/a[" + str(random.randint(1, 3)) + "]/div\", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click()") File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 368, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression document.evaluate("//*[@id="QuestionPane0"]/div[1]/div[2]/a[3]/div", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click() because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string 'document.evaluate("//*[@id="QuestionPane0"]/div[1]/div[2]/a[3]/div", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.click()' is not a valid XPath expression. (Session info: chrome=87.0.4280.88)
source
https://gist.github.com/njhughesSAS/e2a97bb18d40c49c6a6eeb5b71d8b55a

here is xpath to correct answer
/html/body/div[2]/main/ol/li[1]/div/div[2]/div[1]/div[1]/div[2]/a[1]/div/div/span[2]/div/div[1]

[BUG] Google Search Trends - JSONDecodeError

[BING] Starting Desktop and Edge Bing searches...
Traceback (most recent call last):
File "C:\Users\quake\Desktop\m\ms_rewards_farmer.py", line 751, in
bingSearches(browser, remainingSearches)
File "C:\Users\quake\Desktop\m\ms_rewards_farmer.py", line 215, in bingSearches
search_terms = getGoogleTrends(numberOfSearches)
File "C:\Users\quake\Desktop\m\ms_rewards_farmer.py", line 178, in getGoogleTrends
google_trends = json.loads(r.text[6:])
File "C:\Python39\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Originally posted by @larakel1 in #37 (comment)

[BUG] Login failure ignored

Whenever an incorrect username or password is inputted, the program continues going through its list and does not throw an error or realize what went wrong.

image

skipping supersonic quiz[BUG]

Error Log
Paste the error log here.
No error item is skips
Screenshot of the page
Add a screenshot of the page where the error apeared.
image

Source code of dashboard
Copy the source code of the Microsoft Rewards Dashboard Page and paste it on Gist. Then share me the link of the gist here.
here is the xpath for the missed item //*[@id="daily-sets"]/mee-card-group[1]/div/mee-card[2]/div/card-content/mee-rewards-daily-set-item-content/div/div[3]/a/span/ng-transclude
here is the full source
https://gist.github.com/njhughesSAS/0e4ac57d3b24fb520ebfb6ac21ba8445

Sorry!

Sorry i have made many issues but the last one i just was missing dependencies but i had this error while running the farmer
Traceback (most recent call last):
File "ms_rewards_farmer.py", line 299, in
completeDailySet(browser)
File "ms_rewards_farmer.py", line 191, in completeDailySet
completeDailySetSurvey(browser, cardNumber)
File "ms_rewards_farmer.py", line 137, in completeDailySetSurvey
browser.find_element_by_id("btoption" + str(random.randint(0, 1))).click()
File "/home/someone/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "/home/someone/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 978, in find_element
'value': value})['value']
File "/home/someone/.local/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/someone/.local/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="btoption1"]"}
(Session info: chrome=86.0.4240.183)

Cannot find cookie accept button

I never receive a cookie acceptance button, so I have a crash the new line 75
File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer_test.py", line 75, in login
browser.find_element_by_id('bnp_btn_accept').click()
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="bnp_btn_accept"]"}

NtOpenThread: {Access Denied}

Receiving this error in my debug log.

When run, its logs into my account, then stops.

[1120/120648.592:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1120/120648.593:ERROR:exception_snapshot_win.cc(99)] thread ID 15148 not found in process
[1120/120648.609:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1120/120648.609:ERROR:exception_snapshot_win.cc(99)] thread ID 3444 not found in process
[1120/120648.646:ERROR:process_reader_win.cc(123)] NtOpenThread: {Access Denied} A process has requested access to an object, but has not been granted those access rights. (0xc0000022)
[1120/120648.646:ERROR:exception_snapshot_win.cc(99)] thread ID 16420 not found in process

WebDriverWait(browser, time_to_wait).until(ec.visibility_of_element_located((by_, selector)))
File "C:\Python38\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:

[BUG]

Error Log

๏ฟฝ[91m
โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•‘ โ•šโ•โ• โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ•โ• โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘
โ•šโ•โ• โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ• โ•šโ•โ•โ•šโ•โ• โ•šโ•โ•โ•šโ•โ• โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ•๏ฟฝ[00m
๏ฟฝ[95m by Charles Bel (@charlesbel) version 1.1
๏ฟฝ[00m
๏ฟฝ[93m**************************[email protected]********************๏ฟฝ[00m
Traceback (most recent call last):
File "C:\Users\angel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\common\service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2288.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "ms_rewards_farmer.py", line 735, in
browser = browserSetup(True, PC_USER_AGENT)
File "ms_rewards_farmer.py", line 39, in browserSetup
chrome_browser_obj = webdriver.Chrome(options=options)
File "C:\Users\angel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
self.service.start()
File "C:\Users\angel\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\common\service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

JSON Decode Error

i got this error when i ran it
Traceback (most recent call last):
File "script.py", line 108, in
bing_search(10)
File "script.py", line 87, in bing_search
search_terms = get_google_trends(numberOfSearches)
File "script.py", line 76, in get_google_trends
google_trends = json.loads(r.text[6:])
File "/usr/lib/python3.6/json/init.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[BUG]

Error Log

[BING] Finished Desktop and Edge Bing searches !
[LOGIN] Logging-in...
[LOGIN] Writing email...
[LOGIN] Writing password...
[LOGIN] Passing security checks...
[LOGIN] Logged-in !
[LOGIN] Ensuring login on Bing...
Traceback (most recent call last):
  File "ms_rewards_farmer.py", line 144, in checkBingLogin
    POINTS_COUNTER = int(browser.find_element_by_id('fly_id_rc').get_attribute('innerHTML'))
ValueError: invalid literal for int() with base 10: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ms_rewards_farmer.py", line 683, in <module>
    login(browser, account['username'], account['password'], True)
  File "ms_rewards_farmer.py", line 98, in login
    checkBingLogin(browser, isMobile)
  File "ms_rewards_farmer.py", line 146, in checkBingLogin
    checkBingLogin(browser, isMobile)
  File "ms_rewards_farmer.py", line 142, in checkBingLogin
    browser.find_element_by_id('mHamburger').click()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
  (Session info: headless chrome=87.0.4280.141)

Headless ubuntu 20.04 instance
Source code of dashboard
Contains private account information so I didn't provide this.

Page Not found error

Traceback (most recent call last):
File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 485, in
completePunchCards(browser)
File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time.py", line 360, in completePunchCards
completePunchCard(browser, url, punchCard['childPromotions'])
browser.execute_script("document.getElementsByClassName('offer-cta')[0].click()")
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 544, in execute_script
return self.execute(command, {
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute
self.error_handler.check_response(response)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.JavascriptException: Message: javascript error: Cannot read property 'click' of undefined
(Session info: chrome=87.0.4280.66)

image

Feature Request: Docker Image

I think this would be prefect for running in docker. Especially if you can figured out some small details.

Suggestion for features for a docker image:

  • Docker Hub Image (for easy access for someone just wanting to run it)
  • Expose settings in a config file or as environment variables for Cron settings and Accounts

I wish I could create a PR for you but I don't have a lot of experience with Python or creating public Docker images

Multi-Account Management - How

In the features list, there is Multi-Account Management.

How do you use this? I can't see a place to add an additional account details

[BUG] 2 Factor Auth causes it to get stuck at "Ensuring login on Bing"

Error Log
There is no error. It just never goes through.

Screenshot of the page
Sorry. I forgot to get a screenshot but I disabled headless mode and found it was stopping at a 2 factor authentication prompt. Manually entering the auth code here allowed it to proceed.

Source code of dashboard
It's the 2 factor screen. I'll see if I can get it later.

This issue affects accounts where 2 factor is enabled.

NoSuchElementException Error on quiz

looks like we have a new lost element.
Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time_n.py", line 520, in <module> completeDailySet(browser) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time_n.py", line 372, in completeDailySet completeDailySetSurvey(browser, cardNumber) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\import time_n.py", line 242, in completeDailySetSurvey browser.find_element_by_xpath('//*[@id="daily-sets"]/mee-card-group[1]/div/mee-card[' + str(cardNumber) + ']/div/card-content/mee-rewards-daily-set-item-content/div/div[3]/a').click() File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 368, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="daily-sets"]/mee-card-group[1]/div/mee-card[3]/div/card-content/mee-rewards-daily-set-item-content/div/div[3]/a"} (Session info: chrome=87.0.4280.88)
Here is our source code
https://gist.github.com/njhughesSAS/c1d0b52b004303b56b1bd0a66f71388c

Should we put all the features in a try except clause so even if we have a NoSuchElement Error it will move on to the rest of the script and do our searches

i keep getting this error when i run it on idle, i'm not that good at this... any help

Traceback (most recent call last):
File "C:\Windows\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 735, in
browser = browserSetup(True, PC_USER_AGENT)
File "C:\Windows\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 39, in browserSetup
chrome_browser_obj = webdriver.Chrome(options=options)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in init
RemoteWebDriver.init(
File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

Unable to locate element: {"method":"xpath","selector":"//*[@id="rqStartQuiz"]"}

Hi,

Thanks for your amazing job,

Just tested the new version and i get this error (i'm in France, maybe some CSS are exclusive for my country) :

DevTools listening on ws://127.0.0.1:58431/devtools/browser/1b379069-6a9d-4330-af83-74f39cea1193
Traceback (most recent call last):
File "C:\Microsoft Rewards\ms_rewards_farmer.py", line 330, in
completeDailySet(browser)
File "C:\Microsoft Rewards\ms_rewards_farmer.py", line 211, in completeDailySet
completeDailySetQuiz(browser, cardNumber)
File "C:\Microsoft Rewards\ms_rewards_farmer.py", line 152, in completeDailySetQuiz
browser.find_element_by_xpath('//[@id="rqStartQuiz"]').click()
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\XXXX\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//
[@id="rqStartQuiz"]"}
(Session info: chrome=86.0.4240.183)

Thanks,

[BUG]

Traceback (most recent call last):
File "C:\Users\Jose Moreira\Desktop\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 738, in
browser.get('https://account.microsoft.com/rewards/')
File "C:\Users\Jose Moreira\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "C:\Users\Jose Moreira\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\Jose Moreira\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_TIMED_OUT
(Session info: headless chrome=88.0.4324.190)

Failing quiz from the daily set

DevTools listening on ws://127.0.0.1:50591/devtools/browser/79672ace-b15b-4995-b72c-85cd3ef598f4 [8396:5320:1114/082629.092:ERROR:display_layout.cc(562)] PlacementList must be sorted by first 8 bits of display_id Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer_test.py", line 339, in <module> completeDailySet(browser) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer_test.py", line 229, in completeDailySet completeDailySetTrueOrFalse(browser, cardNumber) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\farmer_test.py", line 183, in completeDailySetTrueOrFalse browser.find_element_by_xpath('//*[@id="rqStartQuiz"]').click() File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 368, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 856, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 311, in execute self.error_handler.check_response(response) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="rqStartQuiz"]"} (Session info: chrome=86.0.4240.193)

here is the source for the quiz page
https://gist.github.com/njhughesSAS/952ab6117942214c167b699abe46807f

[BUG] Stuck on Ensuring login on bing

image
I was timing to see how fast it could finish 19 new + one already done account but it got stuck on the second account it's been stuck on it for 10 minutes flat and still stuck I tried restarting it but I'm still stuck on the same issue (is this an issue because I have too many accounts in the file or anything to do with that because it worked before when I only had 5)

Selenium Error

[DAILY SET] Completing quiz of card 2 Traceback (most recent call last): File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 563, in <module> completeDailySet(browser) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 391, in completeDailySet completeDailySetVariableActivity(browser, cardNumber) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 303, in completeDailySetVariableActivity waitUntilVisible(browser, By.XPATH, '//*[@id="currentQuestionContainer"]/div/div[1]', 10) File "c:\Users\User\Documents\Microsoft-Rewards-Farmer-master\test\new_update.py", line 136, in waitUntilVisible WebDriverWait(browser, time_to_wait).until(ec.visibility_of_element_located((by_, selector))) File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:

source:
https://gist.github.com/njhughesSAS/7388685682efe886cb1aa7a96ba5adba

dashboard
image

xPATH for test your smarts
/html/body/div[1]/div[2]/main/div/ui-view/mee-rewards-dashboard/main/div/mee-rewards-daily-set-section/div/mee-card-group[1]/div/mee-card[2]/div/card-content/mee-rewards-daily-set-item-content/div/div[2]/p

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.