mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
Add (testing) uztracker post title scraper | Update Gitignore for venv
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
|
.venv
|
||||||
@@ -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")
|
||||||
Reference in New Issue
Block a user