Add (testing) uztracker post title scraper | Update Gitignore for venv

This commit is contained in:
Vxrtrauter
2025-06-23 17:32:05 +02:00
parent e00311b98d
commit 3782e64e83
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
__pycache__ __pycache__
.venv
+13
View File
@@ -0,0 +1,13 @@
import requests
from bs4 import BeautifulSoup
url = "https://uztracker.net/viewtopic.php?t=23897"
response = requests.get(url)
if response.status_code == 200:
soup = BeautifulSoup(response.content, 'html.parser')
maintitle = soup.find(class_='tt-text')
if maintitle:
print("Program found:", maintitle.text)
else:
print("Program not found")