From 3782e64e83b5ab4335219d2edc656ff76a6bb459 Mon Sep 17 00:00:00 2001 From: Vxrtrauter Date: Mon, 23 Jun 2025 17:32:05 +0200 Subject: [PATCH] Add (testing) uztracker post title scraper | Update Gitignore for venv --- .gitignore | 1 + core/scrapertest.py | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 core/scrapertest.py diff --git a/.gitignore b/.gitignore index bee8a64..b0f2192 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__ +.venv \ No newline at end of file diff --git a/core/scrapertest.py b/core/scrapertest.py new file mode 100644 index 0000000..f5181cd --- /dev/null +++ b/core/scrapertest.py @@ -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") \ No newline at end of file