timur-tabi / amazon-vine

Script to check list of available product on Amazon Vine and notify you if a new item becomes available.
GNU General Public License v3.0
19 stars 7 forks source link

can get the script to work #7

Closed masterac closed 8 years ago

masterac commented 8 years ago

i get syntaxerror : invalid syntax, what am i doing wrong ?

timur-tabi commented 8 years ago

I'm going to need a lot more detail than that.

masterac commented 8 years ago

well i am going to sound like a (french)dumbass, but first i never use python before, and when i trie to run it, i just get the error i told you about. i install python 3.5, is it because you use an older version ? i heard that new version change the condition of the writting and so some code that was correct before can show has a mistake. when i launch it with the CMD in windows ( after typing pithon ) i get Microsoft Windows [version 6.1.7601]Copyright (c) 2009 Microsoft Corporation. Tous droits réservés. C:\Users\masterac>pythonPython 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> C:\Users\masterac\Desktop\amazon-vine.py File "", line 1 C:\Users\masterac\Desktop\amazon-vine.py ^SyntaxError: invalid syntax>>>

thanks again if you can help me understand how to make it work, i can change the code to use it on the french amazon vine, but this happen right out of the box without changing anything mat Date: Tue, 24 May 2016 05:18:55 -0700 From: notifications@github.com To: amazon-vine@noreply.github.com CC: master_a_c@hotmail.com; author@noreply.github.com Subject: Re: [timur-tabi/amazon-vine] can get the script to work (#7)

I'm going to need a lot more detail than that.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

timur-tabi commented 8 years ago

Yes, the script only supports Python 2. It's not obvious, but it makes the most sense if you think of Python 2 and Python 3 as different languages. I'm not a heavy Python programmer, and I like Python 2's stability (it doesn't get updated any more), which is why I continue to use it.

masterac commented 8 years ago

ok thx, can you tell me how to run it ?like you i am tired of seing some vine guy getting 1000 of product every week, me too i want my piece of the pie, especialy when i use 2 web cam and green screen to do my review i do apreciate your time, i tried to get you on twitter 1 month ago, but didnt work i guess ^^

Date: Tue, 24 May 2016 09:17:50 -0700 From: notifications@github.com To: amazon-vine@noreply.github.com CC: master_a_c@hotmail.com; author@noreply.github.com Subject: Re: [timur-tabi/amazon-vine] can get the script to work (#7)

Yes, the script only supports Python 2. It's not obvious, but it makes the most sense if you think of Python 2 and Python 3 as different languages. I'm not a heavy Python programmer, and I like Python 2's stability (it doesn't get updated any more), which is why I continue to use it.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

timur-tabi commented 8 years ago

Sorry, I don't provide support for running my Python scripts. This is github, not an app store. I expect people using my scripts to know how to run Python scripts in general, including installing the other libraries you will need to run the scripts.

masterac commented 8 years ago

ok, thx anyway for telling me i need another version

Date: Tue, 24 May 2016 10:08:03 -0700 From: notifications@github.com To: amazon-vine@noreply.github.com CC: master_a_c@hotmail.com; author@noreply.github.com Subject: Re: [timur-tabi/amazon-vine] can get the script to work (#7)

Sorry, I don't provide support for running my Python scripts. This is github, not an app store. I expect people using my scripts to know how to run Python scripts in general, including installing the other libraries you will need to run the scripts.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

masterac commented 8 years ago

a particular version of python 2 i need ?

Date: Tue, 24 May 2016 10:08:03 -0700 From: notifications@github.com To: amazon-vine@noreply.github.com CC: master_a_c@hotmail.com; author@noreply.github.com Subject: Re: [timur-tabi/amazon-vine] can get the script to work (#7)

Sorry, I don't provide support for running my Python scripts. This is github, not an app store. I expect people using my scripts to know how to run Python scripts in general, including installing the other libraries you will need to run the scripts.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

timur-tabi commented 8 years ago

Use the latest version you can. I use 2.7, which is the last version.

masterac commented 8 years ago

thx, you know i didnt want you to feel i was asking for everything, so sorry if i made you feel that way, coding is was too hard for me, i use to be at 42, but i gave up, but still i want to understand, i was up all night trying to make your script work, but you got me going in the right direction, now i just need to find how to lunch it.

Date: Tue, 24 May 2016 11:15:18 -0700 From: notifications@github.com To: amazon-vine@noreply.github.com CC: master_a_c@hotmail.com; author@noreply.github.com Subject: Re: [timur-tabi/amazon-vine] can get the script to work (#7)

Use the latest version you can. I use 2.7, which is the last version.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub

masterac commented 8 years ago

if i can send you the vine code of the french page, i am sure its the old version of the us. i was able to run it, thx you for your help. also i am trying to remove the tax part of your code, in france we dont have this, i think i got to remove all of this, did i get it right ?

global options    global tax
print datetime.datetime.now().strftime("%Y-%m-%d %H:%M"),    soup = download_vine_page(br, url % link)    # Make sure we don't get a 404 or some other error    if soup:        print 'New item:', link        # Display how much tax it costs        tags = soup.find_all('p', text=re.compile('Estimated tax value : \$[0-9\.]*'))        if tags:            tag = tags[0].contents[0]            m = re.search('\$([0-9\.]*)', tag)            if m:                cost = float(m.group(1))                print 'Tax cost: $%.2f' % cost                # We only care about the cost if we're under the $60000 limit.                # If we're already over it, then show everything.                if options.tax and tax < 50000.0:                    # If it's too expensive, then don't bother showing it                    if cost >= (60000.0 - tax):                        print 'Too expensive'                        return True        webbrowser.open_new_tab(url % link)        time.sleep(1)        return True    else:        print 'Invalid item:', link        return False

def update_tax_estimate(br): global tax soup = download_vine_page(br, 'https://www.amazon.fr/gp/vine/account') if soup: year = datetime.datetime.today().year # A tax year starts from July 1 the previous year to June 30 of this year if (datetime.datetime.today().month > 6): year = year + 1 tags = soup.findall('li', text=re.compile('Estimated %4u: \$[0-9.]' % year)) if tags: # Find the tax estimate for "this" year tag = tags[0].contents[0] m = re.search('\$([0-9.]_)', tag) if m: tax = float(m.group(1)) print 'Current %4u tax estimate: $%.2f' % (year, tax) and this line parser.add_option("-t", dest="tax", help="Ignore items that would cause tax liability to exceed $60000", action="store_true") thx again, if you are ever in paris tell me, i will offer you a drink matDate: Tue, 24 May 2016 11:15:18 -0700 From: notifications@github.com To: amazon-vine@noreply.github.com CC: master_a_c@hotmail.com; author@noreply.github.com Subject: Re: [timur-tabi/amazon-vine] can get the script to work (#7)

Use the latest version you can. I use 2.7, which is the last version.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub