« first day (13 days earlier)      last day (46 days later) » 

11:45 AM
@QHarr thanks for the solution I am trying to run it but it seems like that the website is down, I do not understand clearly what you want. There is two option 1. there is not output for your search 2. there is/are one and more. So we need to skip the IDs without output and filter them for the date.
@QHarr there is also one thing when writing the output to CSV file it fails (not all ones) divide the line to columns. so I need each word between for example 'Cavabdeh: ' and 'İddiaçı: ' goes under the 'Cavabdeh: ' column and words between 'İddiaçı: ' and 'İşin mahiyyəti ' go under of the 'İddiaçı: ' column and etc.
 
 
4 hours later…
3:52 PM
@ValiValizada The code already skips invalid ids. All others I would expect to return data. With the csv part unsure as I didn't run with export only checked that the correct records were being returned in the list before writing to csv.
I will need to investigate writing to csv.
The website seems to be pretty poor. Has it always been this problematic or is it that it throttles (slows connection) for ip addresses it recognises?
 
4:20 PM
@QHarr for my personal pc and also work pc it runs really slow times to times. but today it is not opening the page. I will share the problems with the CSV file. You can look also the output then you will understand what I mean. I am gonna add IDs that have outputs.
9900019651, 9900001881, 1601715911 these IDs have an output.
Please test it and open the file in excel and auto-width the columns you will see that there are text in the columns that have not a header column
 
 
2 hours later…
6:49 PM
@QHarr now the website is working but it is not writing the output to csv file
import requests, re, csv
from bs4 import BeautifulSoup as bs
from datetime import datetime, timedelta
import pandas as pd

headers = ['Ətraflı məlumat: ', 'Cavabdeh: ', 'İddiaçı: ', 'İşin mahiyyəti ']
voens = ['2002283071', '1303450301', '1700393071', '1502109711']
number_of_past_days_plus_today = 3
mask = [datetime.strftime(datetime.now() - timedelta(day_no), '%d.%m.%Y') for day_no in
        range(0, number_of_past_days_plus_today)]
ids = []
table_dates = []

with requests.Session() as s:
    for voen in voens:
@QHarr this code is running too fast
 

« first day (13 days earlier)      last day (46 days later) »