jpchip / giveaway-grabber

Automated Amazon Giveaways using Node & Puppeteer (until 10/17/19) 🎁
MIT License
74 stars 20 forks source link

Some videos aren't youtube so fails to enter #81

Closed sethcohn closed 5 years ago

sethcohn commented 5 years ago

Some of the video entries are now amazon video based.

cheezwiz789 commented 5 years ago

Look here for a workable fix for that:

https://github.com/jpchip/giveaway-grabber/issues/50#issuecomment-488918787

jpchip commented 5 years ago

I will work on adding his fix to main app this week.

cheezwiz789 commented 5 years ago

Just curious... Is that going to mean adding an optional path to an existing Chrome installation to the init config or bundling the appropriate stuff to make this work with Chromium?

jpchip commented 5 years ago

I am adding the ability to specify an optional path to an existing Chrome installation to the init config, and adding an explanation to the readme.

I don't think they will work in chromium, amazon videos are mp4s. (https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/_iSj0aOa2B4)

jpchip commented 5 years ago

Thanks for your help on this, @cheezwiz789. I added you to the contributors list in the package.json file.

famewolf commented 5 years ago

I did some googling regarding this issue and found on Ubuntu this is solvable by installing the chromium-codecs-ffmpeg-extra and chromium-codecs-ffmpeg-nonfree packages. I'm not however sure the chromium downloaded by giveaway grabber will USE those and I'm currently unable to locate the "nonfree" one at all so may require adding a library I don't have for install.

famewolf commented 5 years ago

Looks like some are still getting skipped...for example this one: https://www.amazon.com/ga/p/0fdfd2cd282987b3?fsrc=glp&nav=amz&ref_=aga_p_vg_lp_p41_g10_nodup_dgv

What type is it? Hmm opera couldn't play the video at all either so I must be missing something to play these on linux.

jpchip commented 5 years ago

I think that might just be a bad video, it doesn't load even when I just open that link in Chrome?

famewolf commented 5 years ago

Thanks. It was just weird since both that one and the one right before it acted the same way. Appreciate you fixing these!

sethcohn commented 5 years ago

I think that might just be a bad video, it doesn't load even when I just open that link in Chrome?

Nope,.that video works for me on Android Chrome just fine... I was able to view and then enter the giveaway by clicking on the above link.

jpchip commented 5 years ago

Huh. I went and tried to open the link it in an incognito window, and after logging in, it does work. But the same page doesn't work for me in a normal chrome window. Even tried logging out and back in. Other pages with these kind of videos load for me fine, so not sure what's going on with that one. 🤷‍♂

cheezwiz789 commented 5 years ago

Well... I can't say that I've tested the new release yet, But I will over the next few days.

I can, however say that this particular giveaway with the airy-container video did get entered by 3.2.0 with my modified giveaway.js from here

https://github.com/jpchip/giveaway-grabber/issues/50#issuecomment-488918787

I started it and left it running this morning.

I can tell that this one was entered, because I log in with my phone and look at that page, and it tells me that I didn't win.

Maybe it has something to do with the flash version installed, or, as indicated by the whole incognito mode experiment note above, something to do with saved cookies?

sethcohn commented 5 years ago

Still, just not quite entering. I see it playing the video but not clicking on the Enter button when available. Log looks something like this: giveaway 1 is ready! waiting for video (~15 secs)... could not find #youtube-iframe, trying other selectors... could not find .youtube-video could not find #airy-container Enter for a chance to win!

But if I visit the giveaway, it's not entered, and ready to watch video again.