<jupyter_start><jupyter_text>PLAN- [x] Acquisition    - [x] Select what list of repos to scrape.    - [x] Get requests from the site.    - [x] Save responses to variables.- [ ] Cleanup    - [ ] Prepare the data for delivery.- [ ] Delivery    - [ ] Github repo        - [ ] This notebook.        - [ ] Documentation within the notebook.        - [ ] README file in the repo.        - [ ] Python scripts if applicable.    - [ ] Website Demo  ENVIRONMENT<jupyter_code>from requests import get
from bs4 import BeautifulSoup
SEARCH_PHRASE = 'Moon Phases'<jupyter_output><empty_output><jupyter_text>TEACHERS PAY TEACHERS<jupyter_code>tpt_url = "https://www.teacherspayteachers.com/Browse/Search:" + SEARCH_PHRASE.replace(" ","%20") + "/Order:Relevance/Grade-Level/Second/Price-Range/Free"
tpt_url
def get_tpt_results(url):
    """
    This function takes a url and returns a dictionary that
    contains the metadata of the results of the query.
    """
    response = get(url)
    soup = BeautifulSoup(response.text, 'html.parser')
    results = []
    for result in soup.find_all('div', class_='SearchProductRowLayout'):
        d = dict()
        d['result_title'] = result.find('div', class_='ProductRowTitleBespoke').text
        d['result_href'] = 'https://www.teacherspayteachers.com'+result.a['href']
        d['result_desc'] = result.find('div', class_='TruncatedTextBox').text.strip().encode("utf-8")
        results.append(d)
    return results
tpt = get_tpt_results(tpt_url)<jupyter_output><empty_output><jupyter_text>EDUCATION.COM<jupyter_code>ec_url = "https://www.education.com/resources/second-grade/" + SEARCH_PHRASE.replace(" ","%20")
ec_url
def get_ec_results(url):
    """
    This function takes a url and returns a dictionary that
    contains the metadata of the results of the query.
    """
    response = get(url)
    soup = BeautifulSoup(response.text, 'html.parser')
    results = []
    for result in soup.find_all('div', class_='result'):
        d = dict()
        d['result_title'] = result.find('div', class_='title').text
        d['result_href'] = 'https://www.education.com'+result.a['href']
        d['result_desc'] = result.find('div', class_='description').text.strip().encode("utf-8")
        results.append(d)
    return results
ec = get_ec_results(ec_url)<jupyter_output><empty_output><jupyter_text>CLEAN-UP _Let's clean up the encoding later..._<jupyter_code># def clean_text(text):
#     cleaned = original.replace('\n',' ')
#     cleaned = cleaned.replace('\t',' ')
#     return cleaned

# clean_text(tpt_text)
for result in tpt:
    print(result['result_title'])
    print(result['result_desc'])
    print(result['result_href'])
    print('\n')
for result in ec:
    print(result['result_title'])
    print(result['result_desc'])
    print(result['result_href'])
    print('\n')<jupyter_output>Chart the Phases of the Moon with Marshmallows

b"Help your second grader observe the phases of the moon, and then let the fun loose: he'll get to chart his observations with marshmallows!"
https://www.education.com/activity/article/chart-phases-moon-marshmallows/



Moon Coloring Page

b'Aspiring astronomers, get ready for a stellar coloring page all about the moon! Your child can read some fun facts as he colors.'
https://www.education.com/worksheet/article/moon-coloring-page/



Typing Words with Capital Letters: Moons and Planets

b'Type to the moon and back with CuzCuz as he reaches for the heavens.'
https://www.education.com/game/planets-moons/



The King and the Moon

b'For a leisurely geometry lesson, let your kid relax and read this charming storybook.'
https://www.education.com/game/king-and-moon-math-story/



Color the Whistling Werewolf

b'Most werewolves howl at the full moon, but some werewolves, like this hip fellow, prefer to whistle.'
https://www.education.com/works[...]
{'fraction_non_alphanumeric': 0.13027618551328818, 'fraction_numerical': 0.0018238665971860343, 'mean_word_length': 3.8904458598726115, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 9, 'lorem ipsum': 0, 'www.': 9, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '505357', 'license': 'MIT', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1218, 'n_words': 319, 'path': 'v0.ipynb', 'repo_name': 'ecdedios/lesson-planning-search', 'size': '3838'}