Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Regular Expressions 1. Regular Expressions 2. Implementing Web Scraping in Python with BeautifulSoup. # First of all, save the text in a variable named as
Regular Expressions 1. Regular Expressions 2. Implementing Web Scraping in Python with BeautifulSoup. # First of all, save the text in a variable named as 'para'. Use the variable 'para' for ansering the quesions Q1 to 26 para =''Modern Family is an American fantasy drama television series created by David Benioff and D. B. Weiss. It is an adaptation of A Song of Ice and Fire, George R. R. Martin series of fantasy novels, the first of which is Modern Family. It is filmed in Belfast and elsewhere in the United Kingdom, Canada, Croatia, Iceland, Malta, Morocco, Spain, and the United States. The series premiered on HBO in the United States on April 17, 2011, and its seventh season ended on August 27, 2017. The series will conclude with its eighth season premiering in 2019."". # Q1. Extract all characters from the 'para' using Python Regular Expression. # 02. Extracts only words from the para # Q3. Extract only numbers (whole/complete numbers , not a not a digit) #Q4. Extract first two characters from each word (not the numbers) # Hint: Use word boundary meta character 16 #Q5. Find out all of the words, which start with a vowel (aeiou] #Q6. Count total numbers of word 'the # Q7. Create a html file by writing the following HTML page content to the file named "doc.html" using "%%writefile" # syntax : %%writefile filename # Refer https://stackabuse.com/guide-to-parsing-html-with-beautiful soup-in-python/ # install Beautiful Soup, requests # 08. parse HTML with Beautiful Soup and print the title of doc.html # 09 Print all tags in doc.html #Q10. Print all class elements in doc.html
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started