Categories
Challenge Development

🚀 Running Python Code as Daemon on Linux VPS

📋 Table of Contents

Categories
Challenge Development Productivity

Run Python code in cloud with low/zero cost: options & more

One can absolutely run Python code in the cloud with low/zero cost, and existing VPS is actually the best option for persistent (“daemon”) execution. Below is a detailed comparison of all options, with clear recommendations based on your scenario.


Existing VPS is the PERFECT Solution (Zero Cost Beyond Existing Server)

Since you already have a VPS with Python installed, this is the most cost-effective and reliable option for running code as a daemon. No new costs, full control, and no cloud vendor limitations.

Spoiler: Step by Step setup at VPS.

How to Run as a Daemon on Your VPS:

  1. Use systemd (Modern Linux – Recommended)
    Create a service file (e.g., /etc/systemd/system/myapp.service):
   [Unit]
   Description=My Python App
   After=network.target

   [Service]
   User=youruser
   WorkingDirectory=/path/to/your/app
   ExecStart=/usr/bin/python3 /path/to/your/app/main.py
   Restart=always
   RestartSec=5

   [Install]
   WantedBy=multi-user.target

Then:

   sudo systemctl enable myapp  # Auto-start on boot
   sudo systemctl start myapp   # Start now
Categories
Challenge Development

How to avoid IP bans with rotating proxies [with example code]

When scraping websites or automating online activities, IP bans can be a major obstacle. Many websites implement anti-scraping measures that block repeated requests from the same IP address. To bypass this, using rotating proxies is a common and effective strategy. Rotating proxies automatically switch your IP address with each request, making it harder for websites to detect and block your activity.

Why Use Rotating Proxies?

  • Avoid IP Bans: Changing IPs helps prevent your IP from being flagged or blocked.
  • Bypass Geo-restrictions: Access content restricted to certain regions by rotating through proxies in different locations.
  • Increase Success Rate: Improves the chances of successful requests by mimicking more natural browsing behavior.
Categories
Development

Crawlee library for fast crawler composure

Crawlee is a free web scraping & browser
automation
 library fitting for composing Node.js (and Python) crawlers.

 
Categories
Challenge Development

Playwright Scraper Undetected: Strategies for Seamless Web Data Extraction

Web scraping has become an essential tool for many businesses seeking to gather data and insights from the web. As companies increasingly rely on this method for analytics and pricing strategies, the techniques used in scraping are evolving. It is crucial for scrapers to simulate human-like behaviors to avoid detection by sophisticated anti-bot measures implemented by various websites.

Understanding the importance of configuring scraping tools effectively can make a significant difference in acquiring the necessary data without interruptions. The growth in demand for such data has led to innovations in strategies and technology that assist scrapers in navigating these challenges. This article will explore recent developments in tools and libraries that help enhance the functionality of web scraping procedures.

Categories
Challenge Development

Oxylabs’ Web Scraper API – Experience & more

Experience

We’ve succesfully tested the Web-Scraper-API of Oxylabs. It did well to get data off the highly protected sites. One eg. is Zoro.com protected with Akamai, DataDome, CloudFlare and ReCaptcha! See the numerical results here.

Categories
Challenge Development

Undetected ChromeDriver in Python Selenium

Selenium comes with a default WebDriver that often fails to bypass scraping anti-bots. Yet you can complement it with Undetected ChromeDriver, a third-party WebDriver tool that will do a better job.

In this tutorial, you’ll learn how to use Undetected ChromeDriver with Selenium in Python and solve the most common errors.

Categories
Challenge Development

Python, Selenium for custom browser automation scraper

Recently we’ve got the tricky website, its data being of dynamic nature. Yet we’ve applied the modern day scraping tools to fetch data. We’ve develop an effective Python scraper using Selenium library for browser automation.

About the project

We were asked to have a look at a retailer website.

And our task was to gather data on 210 products’ availability in 945 shops. The scrape resulted in about 200K data entries in a CSV format. Moreover, every line contained information about name, link, brand, store and the availability of a product. Below you can familiarise yourself with a small data sample we were able to gather.

Categories
Challenge Development

Node.js, Python & Ruby Bots Zoo repo

Today, I got in touch with the Node.js [and Python] bots garden/zoo providing modern bots with different kinds of browsers (Firefox, Chrome, Headless/not headless) using different automation frameworks (Puppeteer, Selenium, Playwright) in several programming languages.

Categories
Data Science Development

AI code-writing assistant that understands data content and generates code

Recently I’ve encountred a client that predicts “in 6 month AI will be able to do much coding instead of man”.

…in years you’ll be able to on the fly, ask the AI to purchase a server, or create a website with X website builder… and basically, I bet it will write code on the fly on your demand where it connects to these tool’s APIs to really make things happen. It could do this now for some easy stuff but it’s unreliable and will mess up.

Now we’ve ancountered a interesing public repo, called Sketch. It’s AI code-writing assistant for Pandas (Python) users.