RSSAmplifier

Blog

EVILEG - Practical programming

The latest EVILEG articles on programming and information technology

evileg.comRSS feed ↗10 posts

Latest posts

Виды оптических патч-кордов - какие бывают и как выбрать

Оптические патч-корды – это критически важные компоненты любой волоконно-оптической сети. Они играют роль связующего звена, которое служит для соединения активного сетевого оборудования с пассивным, а также для коммутации между собой отдельных сетевых элементов. Без них сложно представить работу любых центров обработки данных, телекоммуникационных узлов, домашних интернет-сетей. От корректности…

Release of the django-markdown-html-field battery

I have already written articles on how to create a MarkdownField for Django with auto populate functionality. But now I have packaged it as a standalone package for use in Django, which I am sharing with the Django community. You will find the project repository on GitHub: django_markdown_html_field And you can install the package from PyPi: django-markdown-html-field Functionality…

Disabling the ability for site users to add articles

When I had the motivation to turn the EVILEG project into something like a social network or my own Reddit, but it didn't work out, and priorities changed. Therefore, now the creation of new articles will remain only with the site administrators, that is, only with me. Essentially, I will occasionally post my thoughts and notes on the site. I'll stop spending time on something I can't seem to…

Decorator login_not_required in Django 5.1 - Pros and Cons

Today, I accidentally came across a very interesting feature that was added in Django 5.1 . Developers have added the login_not_required decorator, which should be used in conjunction with django.contrib.auth.middleware.LoginRequiredMiddleware . The appearance of this decorator intrigued me because redirection to pages after authentication doesn't work as well as I would like. Here, you get a…

Blocking AI bots at the Nginx level. Why and how?

Today, I'll share a small list of blocked AI bots that were scanning site content to train their neural networks based on other people's content. But first, I'll share some of my thoughts, specifically my attitude towards the whole situation with AI assistants, neural networks, etc. Overall, I have a respectful attitude towards such projects, particularly OpenAI with ChatGPT. It's really cool what…

Blocking IP addresses using Fail2ban with Nginx

Today, I was reviewing the logs of automated site parsing attempts and noticed about a dozen fake User-agents from the same IP address. Here's our culprit: 91.123.13.180 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36 Edg/134.0.0.0 91.123.13.180 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)…

Blocking the Scrapy bot

Here's the reason I decided to take a closer look at who is trying to scrape my site. It's Scrapy, a popular Python framework often used for web scraping and data collection. I might not have paid attention to this, but when your site is shamelessly loaded to 100%, you start thinking about banning the culprit. That's exactly what I did. In nginx, it might look like this if ($http_user_agent ~*…

Blocking the SemrushBot on EVILEG

I'll start sharing information about bots with SemrushBot. SemrushBot is the official web crawler from SEMrush, one of the leading services for SEO, marketing, and competitor analysis. I remember constantly checking backlinks and other site metrics when I first started with EVILEG. A lot of time was spent on strange SEO optimizations. Now, I honestly don't care. I feel that working with social…

Attempts to parse EVILEG by different bots

Today, I caught myself thinking that perhaps I have found an additional pastime: It's manually blocking bots in nginx And the reason for these thoughts was yesterday's attempts at aggressive parsing of EVILEG by some smart guy. It looked like this: You might think that manual blocking is a waste of time. You could use Cloudflare or other ready-made solutions. But I see it differently. It's…

Features of the resolve function behavior when setting the language in Django 5

Today I came across an interesting bug on EVILEG, which involves the behavior of the resolve function for resolving paths on a Django site when setting the language. Introduction Django has a feature for setting the user's language on the site. For example, if the site supports multiple languages, the user can choose English. In the standard Django package, there is a view for setting the language…