May 17, 2026, 11:40 PM
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
from bs4 import BeautifulSoup
|
||||
import requests
|
||||
|
||||
url = "https://jakwybrachosting.pl/"
|
||||
response = requests.get(url)
|
||||
soup = BeautifulSoup(response.text, "html.parser")
|
||||
|
||||
hosting_entries = soup.select("article.rankingList-item")
|
||||
if hosting_entries:
|
||||
for entry in hosting_entries:
|
||||
name = entry.select_one(".rankingList-title h3 a")
|
||||
description = entry.select_one(".rankingList-title h3 span.paragraphLarge")
|
||||
uptime = entry.select_one(".ranking-rowSpec .uptime .bodyText1Medium")
|
||||
performance = entry.select_one(".ranking-rowSpec .simplespeed .bodyText1Medium")
|
||||
disk = entry.select_one(".rankingList-title ul li:nth-child(1) span.bodyText3Regular")
|
||||
transfer = entry.select_one(".rankingList-title ul li:nth-child(2) span.bodyText3Regular")
|
||||
backups = entry.select_one(".rankingList-title ul li:nth-child(3) span.bodyText3Regular")
|
||||
test_period = entry.select_one(".rankingList-title ul li:nth-child(4) span.bodyText3Regular")
|
||||
price = entry.select_one(".ranking-rowSpec .label + p .bodyText1Medium")
|
||||
rating = entry.select_one(".ranking-rating p span.bodyText3Semibold")
|
||||
bullet_list = [li.text.strip() for li in entry.select(".bullet-list li")]
|
||||
|
||||
name_text = name.text.strip() if name else "Brak nazwy"
|
||||
description_text = description.text.strip() if description else "Brak opisu"
|
||||
uptime_text = uptime.text.strip() if uptime else "Brak danych uptime"
|
||||
performance_text = performance.text.strip() if performance else "Brak danych wydajności"
|
||||
disk_text = disk.text.strip() if disk else "Brak danych dysku"
|
||||
transfer_text = transfer.text.strip() if transfer else "Brak danych transferu"
|
||||
backups_text = backups.text.strip() if backups else "Brak danych kopii zapasowych"
|
||||
test_period_text = test_period.text.strip() if test_period else "Brak okresu testowego"
|
||||
price_text = price.text.strip() if price else "Brak danych ceny"
|
||||
rating_text = rating.text.strip() if rating else "Brak oceny"
|
||||
bullet_list_text = "\n- ".join(bullet_list) if bullet_list else "Brak dodatkowych informacji"
|
||||
|
||||
print(f"""
|
||||
Nazwa: {name_text}
|
||||
Opis: {description_text}
|
||||
Uptime: {uptime_text}
|
||||
Wydajność: {performance_text}
|
||||
Dysk: {disk_text}
|
||||
Transfer: {transfer_text}
|
||||
Kopie zapasowe: {backups_text}
|
||||
Okres testowy: {test_period_text}
|
||||
Cena: {price_text}
|
||||
Ocena: {rating_text}
|
||||
Dodatkowe informacje:
|
||||
- {bullet_list_text}
|
||||
""")
|
||||
else:
|
||||
print("Nie znaleziono nazw hostingów.")
|
||||
Reference in New Issue
Block a user