Hello, i dont know where should i post it but it might help someone with similar issues like mine.
franz@Matrix:$(master)$ tree
.
├── LICENSE
├── README.md
├── automate
├── icons
│ ├── browser.ico
│ ├── car.ico
│ ├── car.png
│ ├── link.ico
│ └── www.ico
├── olx1
│ └── olx1.py
├── olx2
│ └── olx2.py
├── otomoto1
│ └── otomoto1.py
└── otomoto2
├── otomoto2.py
└── output
├── 220701-140608
├── 220701-140621
│ ├── 1-output.txt
│ └── 2-clean.txt
├── 220701-140701
│ ├── 1-output.txt
│ └── 2-clean.txt
├── 220701-151153
│ ├── 1-output.txt
│ └── 2-clean.txt
└── 220701-154142
├── 1-output.txt
└── 2-clean.txt
12 directories, 19 files
franz@Matrix:$(master)$ cd otomoto2
franz@Matrix:$(master)$ python3 otomoto2.py
Starting...
First run - no file exists.
File doesn't exist.
Folder created: 220701-154646
Page URL: https://is.gd/YLYNnK
How many pages are there to crawl? 1
Page number: 1 / 1
Waiting for 2 seconds before opening URL...
<●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●> 2/2 [100%] in 2.2s (0.92/s)
Opening page...
Scraping page...
[########################################] (!) 14 in 0.0s (447.98/s)
Successfully added 14 cars to file.
Reading file to clean up...
Cleaning the file...
There are 14 cars in total.
File cleaned up. New lines added.
Keyword wasn't provided - not searching.
Variable not defined. Keyword wasn't provided.
Traceback (most recent call last):
File "otomoto2.py", line 253, in <module>
counter2
NameError: name 'counter2' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "otomoto2.py", line 258, in <module>
file_previous_run = open('output/' + previous_run_datetime + '/2-clean.txt', 'r') # 1st file
NameError: name 'previous_run_datetime' is not defined
Starting...
Previous run: 220701-155140
This run: 220701-155211
Folder created: 220701-155211
Page URL: https://is.gd/YLYNnK
How many pages are there to crawl? 1
Page number: 1 / 1
Waiting for 2 seconds before opening URL...
<●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●> 2/2 [100%] in 2.2s (0.91/s)
Opening page...
Scraping page...
[########################################] (!) 14 in 0.0s (473.69/s)
Successfully added 14 cars to file.
Reading file to clean up...
Cleaning the file...
There are 14 cars in total.
File cleaned up. New lines added.
Keyword wasn't provided - not searching.
Variable not defined. Keyword wasn't provided.
Files are the same.
Script run time: 3.71 seconds.