Coder Social home page Coder Social logo

flipkart-notifier's People

Contributors

ammeysaini avatar sank8dalvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flipkart-notifier's Issues

In Stock error & Default Pincode

I have added products URL of 4 different categories

Temporarily unavailable,
Coming soon,
Not deliverable,
In stock.

As Not Deliverable does not show Notify me button , script recognise it as "In Stock"

Maybe this issue can be solved by input of multiple pincodes verifying that if its in stock and then send message.

I copy pasted the product url

Traceback (most recent call last):
File "c:/Users/rumin/Desktop/product alert/Flipkart-Notifier/fk.py", line 97, in main
if soup.find('button', class_ = '_2AkmmA _3-iCOr wvj5kH').text == 'NOTIFY ME':
AttributeError: 'NoneType' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:/Users/rumin/Desktop/product alert/Flipkart-Notifier/fk.py", line 105, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK').text == ' ADD TO CART':
AttributeError: 'NoneType' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:/Users/rumin/Desktop/product alert/Flipkart-Notifier/fk.py", line 130, in
main()
File "c:/Users/rumin/Desktop/product alert/Flipkart-Notifier/fk.py", line 126, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK _18WSRq')['disabled']:
TypeError: 'NoneType' object is not subscriptable

Traceback Error

There is a error while running script.after 4-6 hours.

Error :-

Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\flipkart\fk.py", line 33, in main
if soup.find('button', class_ = '_2AkmmA _3-iCOr wvj5kH').text == 'NOTIFY ME':
AttributeError: 'NoneType' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\flipkart\fk.py", line 41, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK').text == ' ADD TO CART':
AttributeError: 'NoneType' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\flipkart\fk.py", line 69, in
main()
File "C:\Users\Administrator\Desktop\flipkart\fk.py", line 65, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK _18WSRq')['disabled']:
TypeError: 'NoneType' object is not subscriptable

Adding support for dotenv

I have few ideas that I would like to contribute to this repository.

  1. Getting variables like flipkart link, pincode, telegram api details username from dotenv
  2. If the details doesn't exist in dotenv then ask them from the user and overwrite dotenv so they don't have to type again when they run the script again.
  3. This feature will save a lot of time by directly reading the variables from environment instead of asking from command line everytime.
    I plan to use python-dotenv for the above features.

Please assign me this issue so that I can create the PR for these features.

I did what was written in Readme.md

$ python fk.py

_____ _ _ _ _ _ __ _ | | | __ | \ | | ___ | |()/ () ___ _ __
| |
| |/ / | | |/ _ | | | |_| |/ _ \ '|
| | | < | |\ | () | || | | | __/ |
|
| |
|_\ || _|___/ _||| ||___||

Paste 1st url, When you are done adding urls input "next" to start script: https://www.flipkart.com/realme-6-comet-white-128-gb/p/itm12516d12e4a46?pid=MOBFPCX7U6C69DSU&lid=LSTMOBFPCX7U6C69DSUXD4ZOQ&marketplace=FLIPKART&pageUID=1599578893997
Paste 2nd url, When you are done adding urls input "next" to start script: next
Enter Your Pincode: 110035
Realme 6 (Comet White, 128 GB)ย ย (8 GB RAM) is in stockTraceback (most recent call last):
File "fk.py", line 79, in main if soup.find('button', class_ = '_2AkmmA _3-iCOr wvj5kH').text == 'NOTIFY ME':
AttributeError: 'NoneType' object has no attribute 'text'
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "fk.py", line 102, in main
with app:
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pyrogram/client.py", line 248, in enter
return self.start()
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pyrogram/sync.py", line 56, in async_to_sync_wrap
return loop.run_until_complete(coroutine)
File "/data/data/com.termux/files/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pyrogram/methods/utilities/start.py", line 53, in start
is_authorized = await self.connect()
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pyrogram/methods/auth/connect.py", line 39, in connect
await self.load_session()
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pyrogram/client.py", line 678, in load_session
await self.storage.open()
File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pyrogram/storage/file_storage.py", line 116, in open
self.conn.execute("VACUUM")
sqlite3.DatabaseError: database disk image is malformed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "fk.py", line 111, in
main()
File "fk.py", line 107, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK _18WSRq')['disabled']:
TypeError: 'NoneType' object is not subscriptable
$

Still I git so many errors
Little help will be appreciated ๐Ÿ™ƒ

Traceback (most recent call last):

Traceback (most recent call last):
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\util\connection.py", line 84, in create_connection
raise err
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\util\connection.py", line 74, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 976, in _validate_conn
conn.connect()
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connection.py", line 308, in connect
conn = self._new_conn()
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0610E040>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\connectionpool.py", line 724, in urlopen
retries = retries.increment(
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\urllib3\util\retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.flipkart.com', port=443): Max retries exceeded with url: /realme-5s-crystal-blue-64-gb/p/itm592977b0ba210?marketplace=FLIPKART&iid=4677aff0-30ed-4c28-aada-8354ab102bf5.MOBFM2WZ9AZUPTTZ.SEARCH&ppt=sp&lid=LSTMOBFM2WZ9AZUPTTZXXEDBC&srno=s_1_2&qH=6841e7f327cfede0&pid=MOBFM2WZ9AZUPTTZ&affid=athulc997&ssid=zux9ka8beo0000001594979165177&otracker1=search&ppn=sp (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0610E040>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\KRISHROCKKZ\Desktop\New folder\Flipkart-Notifier-master\Supreme Stonxxx.py", line 145, in
main()
File "C:\Users\KRISHROCKKZ\Desktop\New folder\Flipkart-Notifier-master\Supreme Stonxxx.py", line 85, in main
r = requests.get(url, headers=head, verify=False)
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\requests\sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "C:\Users\KRISHROCKKZ\AppData\Roaming\Python\Python38\site-packages\requests\adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='www.flipkart.com', port=443): Max retries exceeded with url: /realme-5s-crystal-blue-64-gb/p/itm592977b0ba210?marketplace=FLIPKART&iid=4677aff0-30ed-4c28-aada-8354ab102bf5.MOBFM2WZ9AZUPTTZ.SEARCH&ppt=sp&lid=LSTMOBFM2WZ9AZUPTTZXXEDBC&srno=s_1_2&qH=6841e7f327cfede0&pid=MOBFM2WZ9AZUPTTZ&affid=athulc997&ssid=zux9ka8beo0000001594979165177&otracker1=search&ppn=sp (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0610E040>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

Telegram notification

There us no detailed information on how to use this. I have set it up on termux but hmI don't know how to use it to get notified on telegram when my product comes in stock

AttributeError: 'NoneType' object has no attribute 'text'

python fk.py


| | | __ | \ | | ___ | |()/ () ___ _ __
| |
| |/ / | | |/ _ | | | |_| |/ _ \ '|
| | | < | |\ | () | || | | | __/ |
|
| |
|_\ || _|___/ _||| ||___||

Traceback (most recent call last):
File "/data/data/com.termux/files/home/Flipkart-Notifier/fk.py", line 97, in main
if soup.find('button', class_ = '_2AkmmA _3-iCOr wvj5kH').text == 'NOTIFY ME':
AttributeError: 'NoneType' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/home/Flipkart-Notifier/fk.py", line 105, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK').text == ' ADD TO CART':
AttributeError: 'NoneType' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/data/com.termux/files/home/Flipkart-Notifier/fk.py", line 130, in
main()
File "/data/data/com.termux/files/home/Flipkart-Notifier/fk.py", line 126, in main
if soup.find('button', class_ = '_2AkmmA _2Npkh4 _2MWPVK _18WSRq')['disabled']:
TypeError: 'NoneType' object is not subscriptable

Telegram notification issue

hello Ammey, Script is working fine. Telegram notification is comes under my saved message. Anyway to get that under by a bot?

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.