PYTHON MONEY
1.74K subscribers
64 photos
11 videos
10 files
21 links
Earn money. Save time. đŸ’°âŗ
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
A small teaser for one of the upcoming videos.
đŸ”Ĩ25❤9
Some people requested the Amazon titles parser from the last video. I'm sharing it. Read the readme file.

🔑 AmazonParser: https://drive.google.com/drive/folders/1_z-gqOnXDVnAGWz9-fFs20qMpwm1Iy7x?usp=sharing
❤13đŸ”Ĩ5👍1😁1
âšĄđŸ–ī¸ Some people asked to add the ability to automatically merge the generated images into a PDF file in ColoringBot.

✅ I have added this feature. I wrote it using the reportlab library, one of the most powerful libraries for working with PDFs in Python.

1. Redownload the .py files of the project.
2. Install the reportlab and natsort libraries: pip install reportlab natsort
3. Generate images so that they appear in the ready folder.
4. Run the merge_pdf.py file.
5. The final PDF file will be saved in the ready/PDF folder.

â„šī¸ In the merge_pdf.py file, you will find variables to enable adding blank pages, specifying a title, author, and other metadata, and other settings.
❤16👍3
# 👀 Thoughts on ComparisonBot

🚀 I hope you enjoyed ComparisonBot. The bot automates the entire process of creating videos for channels of this type.

But what bottleneck do we have here? What consumes our time? That's right, preparing data for videos, preparing CSV tables.

How can we automate this? I'll give you one way.

📋 What will you need: Write a parser using the Beautiful Soup library to save data in CSV tables

1. Find a website on Google with reviews of the top 10-20 topics you need.

2. Write a bot that will navigate the necessary articles on the website, extract the necessary information, and save the images. Save the data based on the CSV file from the video (crossover.csv).

3. Feed the saved CSV files to the ComparisonBot and get long PNG images.

4. Feed the images to the bot and get videos.

This way, you can prepare dozens and hundreds of such videos very quickly. When parsing, you can also save titles and descriptions for subsequent upload to YouTube.

If you don't have the skills yet, this can be great practice. Data scraping is an excellent foundation for learning Python.

đŸ”Ĩ Excellent tutorials on web scraping in Python: Python Web Scrapping Playbook
👍8đŸ”Ĩ8❤2
This media is not supported in your browser
VIEW IN TELEGRAM
# 🤖 Make your Selenium to bypass some of the most sophisticated anti-bot mechanisms on the market today like DataDome, Perimeterx and Cloudflare.

1. pip install undetected-chromedriver
2. import undetected_chromedriver as uc
3. chrome_options = uc.ChromeOptions() # Set chrome options
4. driver = uc.Chrome(options=chrome_options) # Create undetected chromedriver instance with options
5. driver.get('https://bot.sannysoft.com/') # Send request
đŸ”Ĩ28❤5👍1👏1
This media is not supported in your browser
VIEW IN TELEGRAM
💸💸💸
đŸ”Ĩ42❤10đŸ¤¯4👍1
4.png
375.6 KB
👄 I wrote a bot for detecting faces in photos. Here are the faces I was able to detect in this photo.
đŸ¤Ŗ66👏8😁8❤4đŸĨ°4🤔1🤩1
❤18
👀
đŸ”Ĩ64❤9🙏8❤‍đŸ”Ĩ4👍2👏2🤩2👌2👎1đŸĨ°1
âŗ
❤31đŸ”Ĩ14👍4đŸĨ°2đŸ¤¯2🙏2👎1
🧠
đŸ”Ĩ43❤6👍5👎1đŸĨ°1🙏1
# 🚀 The next lesson of the course is on the way

In this session, we'll be diving into Designing with Python.

During this lesson, we'll further enhance our object-oriented programming skills:

1. Deepen our class intuition 📚
2. Delving further into inheritance â›“ī¸
3. Inheriting multiple classes from a class that is already an inheritor 🔄
4. Learning to dynamically create attributes using the setattr function âš™ī¸
5. Mastering the OOP principle, beautifully named POLYMORPHISM 🎭
6. Working with dataclasses 📋

đŸĻž Pinterest Money is a course where we don't just theorize but write bots for real-world tasks.
đŸ”Ĩ36👍16❤9👏1
Media is too big
VIEW IN TELEGRAM
When for the first time in the entire existence of the channel, I found out that subscribers were sending emails to the Google Drive email for Python bots 😭😭😭
đŸ”Ĩ11😭11😁4đŸĨ°2👍1
One of such emails â¤ī¸
❤54đŸ”Ĩ2đŸĨ°2👍1🤗1
🐍 How to Learn Python
👍24đŸ”Ĩ9❤6đŸ’¯6đŸĨ°2👏2🤗2😁1
🚀 In the next lesson of the Pinterest Money course, we will finalize the development of our Pinterest Monster.

🧠 We will cover some of the OOP principles that will help you start thinking architecturally and develop more flexible and scalable systems.

Here's what we will cover:

1. Multiple inheritance â›“ī¸
2. Understanding MRO (Method Resolution Order) 🔄
3. The problem of diamond inheritance â™Ļī¸
4. Composition 🧩
5. How to choose between composition and inheritance 🤔
6. The Liskov Substitution Principle ✅
7. The Single Responsibility Principle đŸŽ¯
8. Mixins 🎭

đŸĻž As a result of this lesson, we will write a pin uploader with multiple operation modes.
đŸ”Ĩ37👍5❤2đŸĨ°2🤗1
📌 Pin Uploader. How can we write such software?

There are three approaches:

1. Using HTTP requests 🔗

1. We perform the necessary action in the browser. For example, we upload a Pin.
2. Intercept requests between the browser and the server using specialized tools.
3. Analyze the requests. Identify key requests. Collect data about the attributes, body parameters, and headers of these requests and the server's responses to these requests.
4. Form requests with the collected data and send them to the server using Python.

👍 PROS:

â€ĸ Fast performance
â€ĸ Reliability
â€ĸ Imitation of a real browser
â€ĸ No need for applications and API keys to access endpoints

👎 CONS:

â€ĸ Relative complexity of implementation and time spent on analyzing requests

📚 WHAT IS REQUIRED:

1. Understanding of the HTTP protocol and request methods, such as GET and POST.
2. Ability to form and send HTTP requests using the Python requests library.
3. Ability to work with data in JSON format.
4. Understanding of session management and working with cookies.
5. Ability to analyze server responses, including reading HTTP status codes, response headers, and response bodies.

To be continued...
👍21đŸ”Ĩ10❤3đŸĨ°2
...

2. Browser Emulation 🌐

We automate uploading using Selenium or its counterparts (Playwright, Puppeteer)

👍 PROS:

â€ĸ Easy implementation

👎 CONS:

â€ĸ Slow performance
â€ĸ Relatively low reliability
â€ĸ May be detected by anti-bot systems (tips below enhance reliability)

ℹ TIPS:

âœ”ī¸ Use stealth plugins
âœ”ī¸ Hide the navigator.webdriver property
âœ”ī¸ Change the default user-agent
âœ”ī¸ Pass the test at https://bot.sannysoft.com/
đŸ”Ĩ10👍2❤1
...

3. Official API 🔑

1. We register the application in the developers section. Obtain the application ID and secret key.

â„šī¸ To get the application approved, it is necessary to provide a link to the website and a privacy policy.

2. Build an authentication flow based on OAuth 2.0. Obtain the access token.

3. Make requests to API endpoints including the obtained access token and parameters described in the documentation.

👍 PROS:

â€ĸ Reliability

👎 CONS:

â€ĸ Application moderation takes 1-2 days
đŸ”Ĩ9❤3👍2