Piero24 / TelegramBot-AmazonOffers

Receive alerts for the most irresistible Amazon offers straight to your Telegram, courtesy of our bot.
https://linktr.ee/webofferte
Apache License 2.0
2 stars 1 forks source link

A few questions about the project #1

Closed Alex87a closed 2 months ago

Alex87a commented 2 months ago

Good evening! I have some questions about the project:

1) First of all, have you ever encountered the 429 error called "TooManyRequests"? Since these are new channels (at least so it seems to me looking at the ones you inserted in Linktree), you too, like me, should have a very low limit. As a result, Amazon may limit requests. Have you dealt with this before?

2) Would it be possible to have the part of code that deals with image customization? I'm using a Scraper and would like to be able to do something similar.

Thanks in advance!

Piero24 commented 2 months ago

Hi @Alex87a,

  1. The problem 429 error called "TooManyRequests" often occurs if you have a new channel. It can happen for various reasons. Here you can find an answer I had given some time ago on stackoverflow.

    In short, if your APIs are new as it seems to me you must first make a sale through your affiliate link for the APIs to be unlocked. The unlock will last for 30 days from the last sale through your link. So if you make a sale today and tomorrow you get access to the APIs, then you're good for 30 days. If in the next 30 days you don't make any sales through your link, then they will be blocked until you make a new sale. If instead you have already made a sale through your affiliate link and more than 24-48 hours have passed and you can view the products through the amazon scratchpad but not with the bot, then there may be a problem with the parameter settings.

  2. For the image customization part, you can find it here. Here it takes the dimensions of the image and performs the necessary operations to apply it to the background image which you can find here. If you want a different background image, just change the file name to backg-2.jpg or backg-3.jpg with your preferred one. If instead you want to modify the position of the elements in the image, you need to change the values in image_generator.py. Be careful that I use Pillow==9.5.0 because newer versions have changes that do not make the code work correctly.

Alex87a commented 2 months ago

Good morning Piero, thanks for the explanation. Regarding the first answer:

if your APIs are new as it seems to me you must first make a sale through your affiliate link for the APIs to be unlocked. The unlock will last for 30 days from the last sale through your link. So if you make a sale today and tomorrow you get access to the APIs, then you're good for 30 days. If in the next 30 days you don't make any sales through your link, then they will be blocked until you make a new sale.

In reality, I have been in the affiliate program for a few years now, having never actually generated significant earnings from it (I think that in 2 years I will have generated around 32 euros between bounties and affiliate links). From what I understood, according to this page, the limits are not reset every 30 days, but after the FIRST 30 days of use of the API we switch to a system that provides as many requests (TPS – Transactions per second and TPD – Transactions per day) as there are sales, with the increase of TPD of 1 every 0.05 euros. So I was wondering how a small affiliate could generate so much revenue in such a short time. What do you think about that? P.S. You can safely move this conversation to the "Discussions" area, since this is not a problem with the project. I apologize for making it here.