Giter VIP home page Giter VIP logo

auto-amazon-giveaways's People

Contributors

dziban303 avatar sniffingpickles avatar zdrouse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

auto-amazon-giveaways's Issues

Error encountered on video giveaway

Bot crashed immediately after 30-sec timer expired on a video giveaway, with error message "Node is detached from document". Not sure what happened.

This was the second attempt on this giveaway. The first attempt ended with the same error message as seen on issue #3 ("pyppeteer.errors.TimeoutError: Waiting failed: timeout 30000ms exceeds.")

Log into Amazon...
Processing GiveAway:  Weight Loss Cleanse Program For 15 Days - All Natural Organic - Alkaline Your Body For Healthy & Sustainable Weight Loss Detox, Digestion Support - Powerful Colon, Kidney, Liver & Bowel Cleanser
https://www.amazon.com/ga/p/ccfda0de98898097
    **** Waiting 30 seconds. ****
    **** 30 Seconds is over, Entering Contest. ****
Traceback (most recent call last):
  File "give_it_away_now.py", line 18, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "f:\python36\lib\asyncio\base_events.py", line 468, in run_until_complete
    return future.result()
  File "give_it_away_now.py", line 16, in main
    await do_ga_workflow(ga_page)
  File "give_it_away_now.py", line 12, in do_ga_workflow
    await ga_bot.process_giveaways(page)
  File "E:\Auto-Amazon-Giveaways\lib\giveaway.py", line 358, in process_giveaways
    await self.no_req_giveaways()
  File "E:\Auto-Amazon-Giveaways\lib\giveaway.py", line 225, in no_req_giveaways
    await enter_video.click()
  File "f:\python36\lib\site-packages\pyppeteer\element_handle.py", line 124, in click
    obj = await self._visibleCenter()
  File "f:\python36\lib\site-packages\pyppeteer\element_handle.py", line 82, in _visibleCenter
    await self._scrollIntoViewIfNeeded()
  File "f:\python36\lib\site-packages\pyppeteer\element_handle.py", line 79, in _scrollIntoViewIfNeeded
    raise ElementHandleError(error)
pyppeteer.errors.ElementHandleError: Node is detached from document

It worked for a while, but now it just closses on bootup

It worked for about 20 minutes, then it just closed unexpectedly. Now, whenever I boot up the python script, it launches a browser window, logs in to my amazon account, loads the giveaways page, and then the browser window and python window both close suddenly (no error messages, nothing).

What's causing this? It only entered a fraction of the thousands of giveaways available.

Bot opens giveaways which require a follow, leading to crash

In addition to opening video giveaways, the bot has tried to open a giveaway requiring the user follow an account on Amazon. The bot apparently expects a video, and crashes after 30 seconds when it can't find the button.

I definitely don't want to enter giveaways requiring a follow. If it's fixed, an option to enable or disable these would be excellent, either as a command line switch or a block of code to comment out (without breaking anything else).

Errors below. Note one video giveaway worked (on the third try, see issue report #4) before the bot tried a follow giveaway.


Starting give_it_away_now.py
Log into Amazon...
Processing GiveAway:  Weight Loss Cleanse Program For 15 Days - All Natural Organic - Alkaline Your Body For Healthy & Sustainable Weight Loss Detox, Digestion Support - Powerful Colon, Kidney, Liver & Bowel Cleanser
https://www.amazon.com/ga/p/ccfda0de98898097
    **** Waiting 30 seconds. ****
    **** 30 Seconds is over, Entering Contest. ****
  **** You entered the giveaway but did not win. ****
Processing GiveAway:  Kindle Paperwhite E-reader - Black, 6" High-Resolution Display (300 ppi) with Built-in Light, Wi-Fi
https://www.amazon.com/ga/p/95b040af5356e765
Traceback (most recent call last):
  File "give_it_away_now.py", line 18, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "f:\python36\lib\asyncio\base_events.py", line 468, in run_until_complete
    return future.result()
  File "give_it_away_now.py", line 16, in main
    await do_ga_workflow(ga_page)
  File "give_it_away_now.py", line 12, in do_ga_workflow
    await ga_bot.process_giveaways(page)
  File "E:\Auto-Amazon-Giveaways\lib\giveaway.py", line 358, in process_giveaways
    await self.no_req_giveaways()
  File "E:\Auto-Amazon-Giveaways\lib\giveaway.py", line 273, in no_req_giveaways
    await self.display_ga_result(prize_page)
  File "E:\Auto-Amazon-Giveaways\lib\giveaway.py", line 166, in display_ga_result
    await prize_page.waitForSelector('.qa-giveaway-result-text')
  File "f:\python36\lib\site-packages\pyppeteer\frame_manager.py", line 796, in __await__
    yield from self.promise
pyppeteer.errors.TimeoutError: Waiting failed: timeout 30000ms exceeds.

Keeps cycling through the same giveaways

Hello,

Really liking the updates you are making to this, great job!

One thing though is that each time the bot goes to the next page it seems to cycle through all the same giveaways again (starting at page 1) and not just the new ones on the next page even though chrome is on the next page. Is this how it's supposed to work?

Also, any chance this could ever go headless?

log in page

So when you run the script for long periods of time amazon will throw the log in screen at you. Can we create a call to deal with this instead of restarting.

Verification needed

After it logs in to Amazon, I see it gets a prompt from Amazon to email me a verification code that needs to be verified. To get around this, can an option be added to use a different browser profile directory?

ModuleNotFoundError

Encountered on run.

Traceback (most recent call last):
File "give_it_away_now.py", line 2, in
from lib.giveaway import GiveAwayBot
File "C:\Users\robbiepee\Desktop\amazonauto\Auto-Amazon-Giveaways\lib\giveaway.py", line 11, in
from tinydb import TinyDB, Query
ModuleNotFoundError: No module named 'tinydb'

Suggest adding a loop function and random page function

As we talked about on the main fork, I think the bot should start via a loop.py to restart the bot if it crashes.

import sys
 
filename = sys.argv[1]
while True:
    print("\nStarting " + filename)
	#change the path to your python installation directory
    p = Popen("python.exe " + filename, shell=True)
    p.wait()

Also, I would suggest enabling the random page selection again. I see it's included in the new giveaway.py, but it's commented out.

Error after cycling through a handful of Giveaways

Traceback (most recent call last):
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 18, in
asyncio.get_event_loop().run_until_complete(main())
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 568, in run_until_complete
return future.result()
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 16, in main
await do_ga_workflow(ga_page)
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\give_it_away_now.py", line 13, in do_ga_workflow
next_page = await ga_bot.iterate_page(page)
File "C:\Users\djjak\Downloads\Auto-Amazon-Giveaways-master\lib\giveaway.py", line 151, in iterate_page
next_page
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\page.py", line 810, in evaluate
return await frame.evaluate(pageFunction, *args, force_expr=force_expr)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\frame_manager.py", line 272, in evaluate
pageFunction, *args, force_expr=force_expr)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\execution_context.py", line 44, in evaluate
pageFunction, *args, force_expr=force_expr)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\execution_context.py", line 80, in evaluateHandle
'awaitPromise': True,
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyppeteer\connection.py", line 188, in send
msg = json.dumps(dict(id=id, method=method, params=params))
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json_init
.py", line 231, in dumps
return _default_encoder.encode(obj)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Users\djjak\AppData\Local\Programs\Python\Python37-32\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.class.name} '
TypeError: Object of type ElementHandle is not JSON serializable

** Could not find Next Page for GiveAways, Exiting... **

This is the same as the person below me, I thought I'd put the error received though. I think the other guy says he doesn't get an error...
Logs in, goes to auction page, loads, fails as follows.

(base) C:\Bin_\Git\Auto-Amazon-Giveaways>python give_it_away_now.py
Log into Amazon...
Enter your Amazon email address: [email protected]
Enter your Amazon password: I_Hope_You_Realize_This_Is_Not_My_Password_Or_Email
*** no giveaways returned ***
** Could not find Next Page for GiveAways, Exiting... **

Error while running

pyppeteer.errors.ElementHandleError: Evaluation failed: TypeError: Cannot read property 'textContent' of null

Suggestion - Avoid opening giveaway pages that have already been entered

90% of the time I'm running the program it's just showing the "already entered giveaway in the database" and "all checks have been reached, moving on to the next giveaway" messages, because it's opening the same few giveaways in a loop. I'm not sure how the URL structure works, but I'm fairly sure new giveaways generate their own new URLs, so a simple fix would be not to go to any URL that has already been entered into the database, and if it runs out of new giveaways, sleep until a new one is posted - that might even result in a higher win rate for first-come-first-serve giveaways. Unfortunately I've only just started learning Python, so I don't have a suggestion for how to accomplish that

Cannot read property 'textContent' of null

Apparently the same issue as #16. I'm creating a new issue because that ticket lacks the whole error. This started a few days ago, apparently caused by a change in Amazon's HTML.

It usually, but not always, occurs just after login and after the giveaway matrix page loads.

Starting give_it_away_now.py
Log into Amazon...
Traceback (most recent call last):
  File "give_it_away_now.py", line 18, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "C:\Python36\lib\asyncio\base_events.py", line 468, in run_until_complete
    return future.result()
  File "give_it_away_now.py", line 16, in main
    await do_ga_workflow(ga_page)
  File "give_it_away_now.py", line 12, in do_ga_workflow
    await ga_bot.process_giveaways(page)
  File "C:\linux\Auto-Amazon-Giveaways.new\lib\giveaway.py", line 388, in process_giveaways
    await create_ga_prize(giveaway)
  File "C:\linux\Auto-Amazon-Giveaways.new\lib\giveaway.py", line 362, in create_ga_prize
    prize_name_element
  File "C:\Python36\lib\site-packages\pyppeteer\page.py", line 810, in evaluate
    return await frame.evaluate(pageFunction, *args, force_expr=force_expr)
  File "C:\Python36\lib\site-packages\pyppeteer\frame_manager.py", line 272, in evaluate
    pageFunction, *args, force_expr=force_expr)
  File "C:\Python36\lib\site-packages\pyppeteer\execution_context.py", line 44, in evaluate
    pageFunction, *args, force_expr=force_expr)
  File "C:\Python36\lib\site-packages\pyppeteer\execution_context.py", line 85, in evaluateHandle
    helper.getExceptionMessage(exceptionDetails)))
pyppeteer.errors.ElementHandleError: Evaluation failed: TypeError: Cannot read property 'textContent' of null
    at <anonymous>:1:45```

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.