From f7a10e85ffad5e11d4715f54708e9eac5afe0886 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 14 May 2024 13:56:52 +0530 Subject: [PATCH] Formatting and check. --- src/scrape_up/imdb/imdb.py | 3 --- src/test/imdb_test.py | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/scrape_up/imdb/imdb.py b/src/scrape_up/imdb/imdb.py index e44c4519..e730bfe5 100644 --- a/src/scrape_up/imdb/imdb.py +++ b/src/scrape_up/imdb/imdb.py @@ -90,7 +90,6 @@ def scrape_genre_movies(self, genre): genre_data = scraper.scrape_genre_movies(genre) json_data = json.dumps(genre_data, indent=4) - print(json_data) ``` Return\n ```python @@ -103,8 +102,6 @@ def scrape_genre_movies(self, genre): try: url = "https://www.imdb.com/search/title/?genres={}&sort=user_rating,desc&title_type=feature&num_votes=25000,&pf_rd_m=A2FGELUUNOQJNL&pf_rd_p=5aab685f-35eb-40f3-95f7-c53f09d542c3&pf_rd_r=N97GEQS6R7J9EV7V770D&pf_rd_s=right-6&pf_rd_t=15506&pf_rd_i=top&ref_=chttp_gnr_16" formatted_url = url.format(genre) - print(formatted_url) - resp = requests.get(formatted_url, headers=self.headers) content = BeautifulSoup(resp.content, "lxml") genres = [ diff --git a/src/test/imdb_test.py b/src/test/imdb_test.py index a3d3f9f3..a2933931 100644 --- a/src/test/imdb_test.py +++ b/src/test/imdb_test.py @@ -1,5 +1,5 @@ import unittest -from scrape_up import imdb +from scrape_up.imdb import IMDB class IMDBTest(unittest.TestCase): """ @@ -12,7 +12,7 @@ class IMDBTest(unittest.TestCase): """ def setUp(self): - self.scraper = imdb() + self.scraper = IMDB() def test_top_rated(self): response = self.scraper.top_rated()