<jupyter_start><jupyter_text>Resolve Movie Info<jupyter_code>from goje_scrapper.goje import *

movie_url = 'https://www.rottentomatoes.com/m/a_separation_2011'

movie_scraper = GojeScraper(movie_url=movie_url)

movie_scraper.extract_metadata()
print(movie_scraper.metadata)<jupyter_output>{'Score_Rotten': '99', 'Score_Audience': '92', 'movie_scores': {'scoreboard': {'audienceBandedRatingCount': '10,000+', 'audienceCount': 22900, 'audienceCountHref': '/m/a_separation_2011/reviews?type=user&intcmp=rt-scorecard_audience-score-reviews', 'audienceRatingCopy': 'Ratings', 'audienceScore': '92', 'audienceState': 'upright', 'hasVerifiedAudienceScore': False, 'info': '2011, Drama, 2h 3m', 'rating': 'PG-13', 'title': 'A Separation', 'tomatometerCount': 179, 'tomatometerCountHref': '/m/a_separation_2011/reviews?intcmp=rt-scorecard_tomatometer-reviews', 'tomatometerScore': '99', 'tomatometerState': 'certified-fresh'}, 'modal': {'audienceScoreAll': {'averageRating': '4.3', 'bandedRatingCount': '10,000+', 'certified': False, 'likedCount': 8656, 'notLikedCount': 741, 'ratingCount': 22900, 'reviewCount': 1641, 'score': '92', 'scoreSentiment': 'POSITIVE', 'scoreType': 'ALL', 'audienceClass': 'upright'}, 'audienceScoreVerified': {'averageRating': None, 'bandedRatingCount': '0', 'certified[...]<jupyter_text>Resolve the Critic Reviews<jupyter_code>review_list = list()
try:
    movie_scraper.number_of_review_pages()

    for i in range(1,movie_scraper.number_of_review_pages()):
        review_list.append(movie_scraper.extract_critic_reviews(page_number=movie_scraper.number_of_review_pages()))
        print("page {0} is scrapped!".format(i))
except IndexError:
    review_list.append(movie_scraper.extract_critic_reviews())

print(review_list)<jupyter_output><empty_output><jupyter_text>Resolve the Audience Reviews<jupyter_code>all_audience_reviews = movie_scraper.extract_all_audience_reviews(page_number=100)
print(all_audience_reviews)
import pymongo

myclient = pymongo.MongoClient('mongodb://localhost:27017/',
                     username='root',
                     password='<PASSWORD>')
print(myclient.list_database_names())

mydb = myclient["tomato"]

mycol = mydb["movie"]

mycol
print(mydb.list_collection_names())
mydb = myclient["tomato"]
mycol = mydb["movie"]

mydict = { "movie_name": movie_url.split("/m/")[1] , "info": movie_scraper.metadata , "critic_reviews": review_list , "audience_reviews": all_audience_reviews }

x = mycol.insert_one(mydict)
mycol
len(all_audience_reviews)

goje_jaan = GojeScraper()
movie_list = goje_jaan.extract_movie_links(1990,1991)
for m in movie_list:
    print(m[2])<jupyter_output>https://www.rottentomatoes.com/m/1032176-goodfellas
https://www.rottentomatoes.com/m/10009001-the_freshman
https://www.rottentomatoes.com/m/millers_crossing
https://www.rottentomatoes.com/m/the_witches
https://www.rottentomatoes.com/m/arachnophobia
https://www.rottentomatoes.com/m/metropolitan
https://www.rottentomatoes.com/m/reversal_of_fortune
https://www.rottentomatoes.com/m/misery
https://www.rottentomatoes.com/m/edward_scissorhands
https://www.rottentomatoes.com/m/hunt_for_red_october
https://www.rottentomatoes.com/m/grifters
https://www.rottentomatoes.com/m/la_femme_nikita
https://www.rottentomatoes.com/m/presumed_innocent
https://www.rottentomatoes.com/m/tremors
https://www.rottentomatoes.com/m/dances_with_wolves
https://www.rottentomatoes.com/m/darkman
https://www.rottentomatoes.com/m/total_recall
https://www.rottentomatoes.com/m/back_to_the_future_3
https://www.rottentomatoes.com/m/1031086-ghost
https://www.rottentomatoes.com/m/jacobs_ladder
https://www.rottentomatoes.com/m/cr[...]
{'fraction_non_alphanumeric': 0.1531284302963776, 'fraction_numerical': 0.030186608122941824, 'mean_word_length': 7.191011235955056, 'pattern_counts': {'":': 4, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 22, 'lorem ipsum': 0, 'www.': 22, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '286661', 'license': 'MIT', 'n_tokens_mistral': 1471, 'n_tokens_neox': 1381, 'n_words': 161, 'path': 'scratch tomato.ipynb', 'repo_name': 'alifzl/goje_scrapper', 'size': '3641'}