@@ -0,0 +1,1246 @@
+import requests%0Afrom bs4 import BeautifulSoup%0Aimport operator%0A%0A%0Adef get_all_words(url):%0A    source_code = requests.get(url).text%0A    soup = BeautifulSoup(source_code, %22html.parser%22)%0A    base_word_list = %5B%5D%0A    for div_content in soup.findAll(%22div%22, %7B%22class%22: %22esc-lead-snippet-wrapper%22%7D):%0A        content = div_content.string%0A        #print(type(content))%0A        #continue;%0A        if content is not None:%0A            base_words = content.lower().split(%22 %22)%0A            for word in base_words:%0A                base_word_list.append(word)%0A    filter_words(base_word_list)%0A%0A%0Adef filter_words(words):%0A    filtered_word_list = %5B%5D%0A    symbols = %22~%60!@#$%25%5E&*()_-+=;:'%5C%22,%3C.%3E/?%5B%7B%5D%7D%5C%7C%22%0A    for word in words:%0A        for i in range(0, len(symbols)):%0A            clean_word = word.replace(symbols%5Bi%5D, %22%22)%0A            if len(clean_word) %3E 0:%0A                filtered_word_list.append(clean_word)%0A    count_and_sort(filtered_word_list)%0A%0A%0Adef count_and_sort(words):%0A    result_set = %7B%7D;%0A    for word in words:%0A        if word in result_set:%0A            result_set%5Bword%5D += 1%0A        else:%0A            result_set%5Bword%5D = 1%0A    final_set = sorted(result_set.items(), key=operator.itemgetter(1))%0A    print(final_set)%0A%0Aget_all_words(%22https://news.google.co.in/%22)%0A

Create word_frequency_from_web.py