# Search for a recent Bollywood hit movies = p.search("RRR") print(f"Found len(movies) matches.")
# ---------------------------------------------------------------------- # Configuration & Logging # ---------------------------------------------------------------------- logging.basicConfig( level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", handlers=[logging.StreamHandler()] )
# Initialise the client (you can add an OMDb API key if you have one) p = Posy()
# 3. (Optional) Add your OMDb API key to a .env file: # OMDB_API_KEY=your_key_here
# 2. Install dependencies pip install -r requirements.txt
# ---------------------------------------------------------------------- # Helper: parse movie titles from the HTML # ---------------------------------------------------------------------- def parse_titles(html: str): soup = BeautifulSoup(html, "html.parser") # Filmyzilla typically lists titles inside <a class="movie-title"> tags. # Adjust the selector if the site changes. title_tags = soup.select("a.movie-title") titles = [tag.get_text(strip=True) for tag in title_tags] logging.info(f"Found len(titles) titles on the page.") return titles
logging.info(f"Sleeping for poll_intervals...") time.sleep(poll_interval)
import requests from bs4 import BeautifulSoup from posy import Posy import pandas as pd
# Search for a recent Bollywood hit movies = p.search("RRR") print(f"Found len(movies) matches.")
# ---------------------------------------------------------------------- # Configuration & Logging # ---------------------------------------------------------------------- logging.basicConfig( level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s", handlers=[logging.StreamHandler()] )
# Initialise the client (you can add an OMDb API key if you have one) p = Posy() pip & posy filmyzilla
# 3. (Optional) Add your OMDb API key to a .env file: # OMDB_API_KEY=your_key_here
# 2. Install dependencies pip install -r requirements.txt # Search for a recent Bollywood hit movies = p
# ---------------------------------------------------------------------- # Helper: parse movie titles from the HTML # ---------------------------------------------------------------------- def parse_titles(html: str): soup = BeautifulSoup(html, "html.parser") # Filmyzilla typically lists titles inside <a class="movie-title"> tags. # Adjust the selector if the site changes. title_tags = soup.select("a.movie-title") titles = [tag.get_text(strip=True) for tag in title_tags] logging.info(f"Found len(titles) titles on the page.") return titles
logging.info(f"Sleeping for poll_intervals...") time.sleep(poll_interval) # Adjust the selector if the site changes
import requests from bs4 import BeautifulSoup from posy import Posy import pandas as pd