AnthonyZJiang / Microsoft-Rewards-Bot

Microsoft Rewards (Bing Rewards) Bot - automated selenium python bot
27 stars 4 forks source link

Mobile Searches doesn't work #16

Open LtCMDstone opened 2 years ago

LtCMDstone commented 2 years ago

Hey nice work over here! I have a problem with the mobile searches, the bot searches but I don't get any points, right before I get 4 errors.

`2022-04-30 06:32:09,319 :: INFO :: root :: Logging in *****e@gmail.com... 2022-04-30 06:32:32,548 :: ERROR :: root :: '//[@aria-label="Preferences"]' element not clickable - Timeout Exception. Screenshot saved to logs/20220430063232_355620.png 2022-04-30 06:32:32,731 :: ERROR :: root :: Element not found when searched for '//[@aria-label="Preferences"]' by xpath. Screenshot save to logs/20220430063232_558824.png 2022-04-30 06:32:38,214 :: ERROR :: root :: '//[text()='Sign in']//parent::a' element not clickable - Timeout Exception. Screenshot saved to logs/20220430063238_024979.png 2022-04-30 06:32:38,414 :: ERROR :: root :: Element not found when searched for '//[@aria-label="Preferences"]' by xpath. Screenshot save to logs/20220430063238_233690.png 2022-04-30 06:32:40,542 :: INFO :: root :: Logging successful. 2022-04-30 06:32:40,754 :: INFO :: root :: Mobile search started. 2022-04-30 06:32:41,959 :: INFO :: root :: # of search items: 204

2022-04-30 06:32:41,959 :: INFO :: root :: Search #0: ozark 2022-04-30 06:32:47,983 :: INFO :: root :: Search #1: ozark season 4 part 2`

The error screenshots shows all the same, could it be the cookie accept stuff?

20220430063232_355620 20220430063232_558824 20220430063238_024979 20220430063238_233690

charettepa commented 2 years ago

same issue as a few months ago with pc search just use a newer user agent for mobile at this point it should be 100+

@tmxkn1 would it be possible to use the newest user agents on new releases?

AnthonyZJiang commented 2 years ago

Hey nice work over here! I have a problem with the mobile searches, the bot searches but I don't get any points, right before I get 4 errors.

Thanks for reporting this. Can you try again, please? I've pushed a quick fix for the error and updated UA.

same issue as a few months ago with pc search just use a newer user agent for mobile at this point it should be 100+

@tmxkn1 would it be possible to use the newest user agents on new releases?

Yes, it's been updated.

charettepa commented 2 years ago

thanks for the quick change

just a slight typo but worth changing if you have time in login.py line 40

   logging.info(msg='Logging successful.')

should read

   logging.info(msg='Loggin successful.')
LtCMDstone commented 2 years ago

Thanks for the fix, I will test tomorrow morning when everything is ressetted. Will report!

LtCMDstone commented 2 years ago

Nice now the mobile searches are working and I get the points! Nevertheless the error is still there and produces the same screenshots.

2022-05-01 06:38:12,449 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:38:12,449 :: INFO   :: root :: -----------------------New------------------------
2022-05-01 06:38:12,449 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:38:12,449 :: INFO   :: root :: Bot version: v2.2.0
2022-05-01 06:38:12,450 :: INFO   :: root :: logins retrieved, 1 account(s):
2022-05-01 06:38:12,450 :: INFO   :: root :: **********@gmail.com
2022-05-01 06:38:12,450 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:38:12,450 :: INFO   :: root :: Current account: **********@gmail.com
2022-05-01 06:38:15,098 :: INFO   :: root :: Logging in **********@gmail.com...
2022-05-01 06:38:32,981 :: ERROR  :: root :: 'id_l' element not clickable - Timeout Exception. Screensh23679.png
2022-05-01 06:38:33,137 :: ERROR  :: root :: Element not found when searched for 'id_l' by id. Screensh2721.png
2022-05-01 06:38:38,573 :: ERROR  :: root :: 'id_l' element not clickable - Timeout Exception. Screensh17578.png
2022-05-01 06:38:40,671 :: INFO   :: root :: Logging successful.
2022-05-01 06:38:43,401 :: INFO   :: root :: Account summary:
2022-05-01 06:38:43,401 :: INFO   :: root :: Available Points......... 51164
2022-05-01 06:38:43,401 :: INFO   :: root :: PC Search ............... 0/90
2022-05-01 06:38:43,401 :: INFO   :: root :: Mobile Search ........... 0/60
2022-05-01 06:38:43,402 :: INFO   :: root :: Quiz .................... 0/330
2022-05-01 06:38:43,402 :: INFO   :: root :: Punch Card .............. 0/0
2022-05-01 06:38:43,402 :: INFO   :: root :: ----------Work started-----------
2022-05-01 06:38:46,103 :: INFO   :: root :: Logging in **********@gmail.com...
2022-05-01 06:39:04,790 :: ERROR  :: root :: 'id_l' element not clickable - Timeout Exception. Screensh25597.png
2022-05-01 06:39:04,962 :: ERROR  :: root :: Element not found when searched for 'id_l' by id. Screensh1009.png
2022-05-01 06:39:10,393 :: ERROR  :: root :: 'id_l' element not clickable - Timeout Exception. Screensh34995.png
2022-05-01 06:39:12,507 :: INFO   :: root :: Logging successful.
2022-05-01 06:39:12,707 :: INFO   :: root :: PC search started.
2022-05-01 06:39:13,821 :: INFO   :: root :: # of search items: 226

2022-05-01 06:39:13,822 :: INFO   :: root :: Search #0: naomi judd
2022-05-01 06:39:19,709 :: INFO   :: root :: Search #1: naomi judd cause of death
2022-05-01 06:39:24,119 :: INFO   :: root :: Search #2: ashley judd

Also if I do the quizes i get an error, the important 3 daily are working just fine, but for the additional quizes below the punchcard slider I get this and the bot exits hardly, so if I would start it with the --all flag it would'nt go over to the searches.

2022-05-01 06:52:12,825 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:52:12,825 :: INFO   :: root :: -----------------------New------------------------
2022-05-01 06:52:12,825 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:52:12,825 :: INFO   :: root :: Bot version: v2.2.0
2022-05-01 06:52:12,826 :: INFO   :: root :: logins retrieved, 1 account(s):
2022-05-01 06:52:12,826 :: INFO   :: root :: **********@gmail.com
2022-05-01 06:52:12,826 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:52:12,826 :: INFO   :: root :: Current account: **********@gmail.com
2022-05-01 06:52:15,500 :: INFO   :: root :: Logging in **********@gmail.com...
2022-05-01 06:52:32,505 :: INFO   :: root :: Logging successful.
2022-05-01 06:52:35,615 :: INFO   :: root :: Account summary:
2022-05-01 06:52:35,615 :: INFO   :: root :: Available Points......... 51224
2022-05-01 06:52:35,615 :: INFO   :: root :: PC Search ............... 0/90
2022-05-01 06:52:35,615 :: INFO   :: root :: Mobile Search ........... 60/60
2022-05-01 06:52:35,615 :: INFO   :: root :: Quiz .................... 305/330
2022-05-01 06:52:35,615 :: INFO   :: root :: Punch Card .............. 0/0
2022-05-01 06:52:35,616 :: INFO   :: root :: ----------Work started-----------
2022-05-01 06:52:40,659 :: INFO   :: root :: Number of open offers: 3
2022-05-01 06:52:41,776 :: ERROR  :: root :: An error has occurred.
Traceback (most recent call last):
  File "/home/stone/Microsoft-Rewards-Bot/ms_rewards.py", line 119, in run_bot
    msr.work(flag_pc=parser.pc_mode, flag_mob=parser.mobile_mode,
  File "/home/stone/Microsoft-Rewards-Bot/msreward/msr.py", line 46, in work
    self._work(flag_pc, flag_mob, flag_quiz)
  File "/home/stone/Microsoft-Rewards-Bot/msreward/msr.py", line 57, in _work
    self.worker.do_offer(summary)
  File "/home/stone/Microsoft-Rewards-Bot/msreward/worker/worker.py", line 23, in do_offer
    self._offer.do_offers()
  File "/home/stone/Microsoft-Rewards-Bot/msreward/worker/offers.py", line 20, in do_offers
    if not self._do_offers():
  File "/home/stone/Microsoft-Rewards-Bot/msreward/worker/offers.py", line 37, in _do_offers
    self._goto_offer_link(link)
  File "/home/stone/Microsoft-Rewards-Bot/msreward/worker/offers.py", line 43, in _goto_offer_link
    link.click()
  File "/home/stone/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "/home/stone/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py", line 693, in _execute
    return self._parent.execute(command, params)
  File "/home/stone/.local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 400, in execute
    self.error_handler.check_response(response)
  File "/home/stone/.local/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 236, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a class="ds-card-sec" ng-href="https://www.bing.com/search?q=Bing+News+Quiz&amp;setmkt=de-de&amp;setlang=de-de&amp;form=ML2108&amp;OCID=ML2108&amp;PUBL=RewardsDO&amp;CREA=ML2108&amp;rnoreward=1" target="true" aria-disabled="false" aria-label="Ihr Nachrichtenüberblick   An wie viele Schlagzeilen dieser Woche können Sie sich erinnern?   10 Punkte" href="https://www.bing.com/search?q=Bing+News+Quiz&amp;setmkt=de-de&amp;setlang=de-de&amp;form=ML2108&amp;OCID=ML2108&amp;PUBL=RewardsDO&amp;CREA=ML2108&amp;rnoreward=1">...</a> is not clickable at point (626, 400). Other element would receive the click: <div id="wcpConsentBannerCtrl" class="_23tra1HsiiP6cT-Cka-ycB" dir="ltr" role="alert">...</div>
  (Session info: headless chrome=101.0.4951.41)
Stacktrace:
#0 0x55c920fcd533 <unknown>
#1 0x55c920d2c1e8 <unknown>
#2 0x55c920d69972 <unknown>
#3 0x55c920d674d2 <unknown>
#4 0x55c920d64b64 <unknown>
#5 0x55c920d63902 <unknown>
#6 0x55c920d574a9 <unknown>
#7 0x55c920d7ff42 <unknown>
#8 0x55c920d56d63 <unknown>
#9 0x55c920d8004e <unknown>
#10 0x55c920d93224 <unknown>
#11 0x55c920d7fe33 <unknown>
#12 0x55c920d5571a <unknown>
#13 0x55c920d56875 <unknown>
#14 0x55c921011e1d <unknown>
#15 0x55c921015751 <unknown>
#16 0x55c920ffc07e <unknown>
#17 0x55c921016388 <unknown>
#18 0x55c920ff0fe0 <unknown>
#19 0x55c921032748 <unknown>
#20 0x55c9210328c8 <unknown>
#21 0x55c92104c70d <unknown>
#22 0x7fb70b907fa3 <unknown>

2022-05-01 06:52:41,778 :: INFO   :: root :: --------------------------------------------------
2022-05-01 06:52:41,778 :: INFO   :: root :: -----------------------End------------------------
2022-05-01 06:52:41,778 :: INFO   :: root :: --------------------------------------------------