ro  fr  en  es  pt  ar  zh  hi  de  ru
ART 2.0 ART 3.0 ART 4.0 ART 5.0 ART 6.0 Pinterest

ازگر: مجھے ای میل کے ذریعہ مطلع کریں جب کوئی خاص مصنوع اسٹور میں کم ترین قیمت پر منحصر ہوتا ہے

On March 16, 2022, in Python Scripts Examples, by Neculai Fantanaru

آپ یہاں مکمل کوڈ دیکھ سکتے ہیں:https: // passatbin.com/nd8e yt xa

انسٹال کریںازگرپھر ، پھر ، پھر

میں سائٹ کو بطور مثال لوں گاhttps: // woohoo.

نیز اس ویب سائٹ پر پروڈکٹ کی مثال کے طور پر ، میں اس کتاب کی تلاش کروں گا: "کلیسیل آرٹ میں ڈرائنگ ، رنگ ، تشکیل اور اظہار کا مطالعہ"

The Python code will have to notify me by email when this book returns to stock, with a price of less than 90 RON.

ذکر:اگر آپ چاہتے ہیں کہ یہ کوڈ پس منظر میں مسلسل چلتا رہے تو آپ کو فائل کی توسیع کو تبدیل کرنے کی ضرورت ہوگی.pyمیں

اسکرپٹ چلانے سے پہلے آپ کو مندرجہ ذیل کام کرنے کی ضرورت ہے:

  • From the CMD (command prompt) console, run the command:پائپ انسٹال ازگر
To start the program run the following command in CMD (in the folder where the file is located):
  • pythonw okazii.pyw
Now the process will run continuously in the background. To stop the process, you must run the command:
  • TASKKILL /F /IM pythonw.exe
CAREFUL!!! All commands are run from the command line in the folder where the file is located.

اگر آپ صرف ازگر کے ساتھ فائل چلانا چاہتے ہیںOkazii.pyw، آپ یہ بھی کر سکتے ہیں ، لیکن آپ کو ہمیشہ کنسول کو کھلا رکھنا چاہئے۔ آپ پھانسی کو روک سکتے ہیںctrl + cکمانڈ پرامپٹ (سی ایم ڈی) سے

Do not use GMAIL for default email adress !

#-------------------------------------------------------------------------------
# Author:      Fantanaru Neculai
#
# Created:     16/03/2022
# Copyright:   (c) Fantanaru Neculai 2022
#-------------------------------------------------------------------------------

from bs4 import BeautifulSoup as bs
import pandas as pd
pd.set_option('display.max_colwidth', 500)
import time
import requests
import random
import re

page = requests.get("https://www.okazii.ro/")

soup = bs(page.content)

# Studiul desenului, culorii, compozitiei si expresiei in arta eclesiala
result = requests.get("https://www.okazii.ro/cautare/studiul+desenului%2C+culorii%2C+compozitiei+si+expresiei+in+arta+eclesiala.html")

# preluam text dintre  si 
produse_sectiune_pattern = re.compile('([\s\S]*?)
') produse_sectiune = re.findall(produse_sectiune_pattern, result.text) produse_sectiune = produse_sectiune[0] preturi_pattern = re.compile('(.*?)') preturi = re.findall(preturi_pattern, produse_sectiune) print(preturi) count = 0 for pret in preturi: if int(pret) < 90: # puneti <= daca vreti ca pretul sa fie si egal cu 90 RON count += 1 print("Am gasit {} oferte cu pretul sub 90 lei.".format(count)) # soup_cautare = bs(result.text, 'html.parser') # print(soup_cautare) #items = soup_cautare.find_all(class_ = 'listing-product ') #print(items) # Trimitere email import sys import smtplib from_addr = 'YOUR EMAIL ADRESS' to_addrs = ['YOUR EMAIL ADRESS'] msg = """From: Sender To: Recipient Subject: Okazii Am gasit 1 oferte cu pretul sub 90 lei. """ try: s = smtplib.SMTP('mail.neculaifantanaru.com', 26) # put here your own SMTP PORT and hosting email s.login('YOUR EMAIL ADRESS', 'PASSWORD') # do not use GMAIL !! s.sendmail(from_addr, to_addrs, msg) s.quit() except smtplib.SMTPException: print("Error: ", sys.exc_info()[0])

That's all folks.

If you like my code, then make me a favor: translate your website into Romanian, "ro".

نیز ، وہاں ایک ہےورژن 2اس کوڈ کا یاورژن 3یاورژن 4یاورژن 5یاورژن 6


Latest articles accessed by readers:

  1. An Eye To See And A Mind To Understand
  2. Turn Towards Me With An Eye Full Of Your Own Gaze
  3. The Snapshot Of Magic In God's Universe
  4. Rhythm Of My Heart

Donate via Paypal

Alternate Text

RECURRENT DONATION

Donate monthly to support
the NeculaiFantanaru.com project

SINGLE DONATION

Donate the desired amount to support
the NeculaiFantanaru.com project

Donate by Bank Transfer

Account Ron: RO34INGB0000999900448439

Open account at ING Bank

Join The Neculai Fantanaru Community



* Note: If you want to read all my articles in real time, please check the romanian version !

decoration
About | Site Map | Partners | Feedback | Terms & Conditions | Privacy | RSS Feeds
© Neculai Fântânaru - All rights reserved