diff --git a/core/scrapertest.py b/core/scrapertest.py index f5181cd..923ec5c 100644 --- a/core/scrapertest.py +++ b/core/scrapertest.py @@ -1,13 +1,20 @@ 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') +url = "https://uztracker.net/viewtopic.php?t=23897" # placeholder url for now +response = requests.get(url) # get da content from da url +soup = BeautifulSoup(response.content, 'html.parser') # create bs object + +def get_post_title(): maintitle = soup.find(class_='tt-text') if maintitle: print("Program found:", maintitle.text) else: - print("Program not found") \ No newline at end of file + print("Program not found") + + + +if response.status_code == 200: + get_post_title() + \ No newline at end of file