âĄđī¸ 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:
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.
â 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 natsort3. 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
đ 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
scrapeops.io
The Python Web Scraping Playbook | ScrapeOps
Everything you need to know to become a Python Web Scraping Pro! Including Python Web Scraping guides, extensions, scrapers and much more.
đ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.
2.
3.
4.
5.
1.
pip install undetected-chromedriver2.
import undetected_chromedriver as uc3.
chrome_options = uc.ChromeOptions() # Set chrome options4.
driver = uc.Chrome(options=chrome_options) # Create undetected chromedriver instance with options5.
driver.get('https://bot.sannysoft.com/') # Send requestđĨ28â¤5đ1đ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
đ VPN Master (additional materials): https://drive.google.com/drive/folders/1h_iPhsnkD_QwzZT4tbMrqZS98C0jGwsC?usp=sharing
â¤18
# đ 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.
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
đ 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.
đ§ 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...
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/
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
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