<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cassandra Parisi</title>
    <description>The latest articles on DEV Community by Cassandra Parisi (@cparisi1290).</description>
    <link>https://dev.to/cparisi1290</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F544222%2Fc9cf5e34-8961-40a6-b8ad-4ce1c40b6e7a.jpeg</url>
      <title>DEV Community: Cassandra Parisi</title>
      <link>https://dev.to/cparisi1290</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cparisi1290"/>
    <language>en</language>
    <item>
      <title>CLI – What You Need to Know about Scraping</title>
      <dc:creator>Cassandra Parisi</dc:creator>
      <pubDate>Mon, 11 Jan 2021 03:48:53 +0000</pubDate>
      <link>https://dev.to/cparisi1290/cli-what-you-need-to-know-about-scraping-35l2</link>
      <guid>https://dev.to/cparisi1290/cli-what-you-need-to-know-about-scraping-35l2</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;What is scraping?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Web scraping is the act of inspecting the html code of a webpage and extracting information from HTML, CSS or JavaScript code, though scraping from Javascript is a more intricate process.&lt;/p&gt;

&lt;p&gt;In my command line interface project, I chose to scrape a bookstore website, &lt;a href="https://bookshop.org/books?keywords=permaculture"&gt;https://bookshop.org/books?keywords=permaculture&lt;/a&gt;, to extract the title, author, price, and URL. The URL was necessary to scrape into a second layer to extract the book’s description.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How to tell if a site is scrapeable?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One challenge I ran into was figuring out what qualifies a scrapeable website. After reading and listening to several resources, I’ve collected a list of qualifiers.&lt;br&gt;
You will want to find a page that:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Has a repetitive format.&lt;/strong&gt; You will want to use a site that has a list of items that follow the same format, making it easier to iterate, or filter through, each item to extract the information you want.&lt;/p&gt;

&lt;p&gt;For instance, in the Figure 1 below, there is an unordered list of items. Great start. Figure 2 shows two items from the list in Figure 1 after they’ve been expanded. As you can see, the format repeats from one item to the next—each one contains same hierarchy of classes: h2, a href, h3, and div. These classes contain the information I want to scrape for my CLI.  &lt;/p&gt;

&lt;p&gt;Figure 1 &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ICqVIJzk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eo2j5ca5z5b5deytl1i7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ICqVIJzk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/eo2j5ca5z5b5deytl1i7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 2&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uR4YJAnW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u82yuynwyxz4g82ud2gn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uR4YJAnW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u82yuynwyxz4g82ud2gn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2) Does not have a lot of JavaScript in its code.&lt;/strong&gt;&lt;br&gt;
One way to confirm this is to right-click anywhere on the webpage and click “inspect.” A window will appear. At the top of the window, select the “Sources” tab. This will show you what coding language was used in the site, like in Figure 3.  &lt;/p&gt;

&lt;p&gt;Figure 3&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5q3hFG9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7tpljyizwlaz19jaj0v1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5q3hFG9y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7tpljyizwlaz19jaj0v1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another way to confirm this is to look for telltale signs of Javascript when you inspect the page—elements with js-, js class, toggle classes like ::, or endless scrolling in the site.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Won’t change often.&lt;/strong&gt; If the programmers of the site you scraped decide to change the layout of their site, your scraped coding will break. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Has useful descriptor tags like class and ID names.&lt;/strong&gt;&lt;br&gt;
For example, take a look at Figure 4, a website that shows yoga studios in Charlotte. Although this site has a list of studios that you might be tempted to scrape, it does not have a lot of descriptors for each studio. If you look in Figure 5, for each studio’s “p” tag, all of the studio’s information is included within a single “p” tag. This means there’s no good way to access individual pieces of information such as location, style, or even the name of the studio. &lt;br&gt;
Figure 4&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aZgmiG6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fe3ef7x7351im7xpql5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aZgmiG6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fe3ef7x7351im7xpql5n.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 5&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cDM_D1pZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9s5rwpazn2p4sei80n88.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cDM_D1pZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9s5rwpazn2p4sei80n88.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead, look for a site with descriptor classes and ID’s, preferably classes because IDs refer to one specific element (which makes iterable coding more difficult). Each of the highlighted items in Figure 6, below, show a hierarchy of data, with descriptor classes that can be drilled down into for scraping specific pieces of information in my CLI. &lt;br&gt;
Figure 6&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d7168RCD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sand2nu9pblzwj23xd6p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d7168RCD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/sand2nu9pblzwj23xd6p.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What in the *CODE!?!&lt;/strong&gt;*
&lt;/h2&gt;

&lt;p&gt;Figure 7&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4FJ5RVKv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a8w8p2j0glo2w3qvaorr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4FJ5RVKv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/a8w8p2j0glo2w3qvaorr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 7 is an excerpt from my CLI project. Since I used scraping to extract information from the website, I required the gems called Nokogiri and open-uri. &lt;/p&gt;

&lt;p&gt;When the program runs and comes to the open-uri code, this tells the program to go to the referenced website. Then the Nokogiri code tells the program to return the HTML code from the website. &lt;br&gt;
After those gems are executed, you’ll want comb out the information you want to use. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=_rFCEXpP28E"&gt;https://www.youtube.com/watch?v=_rFCEXpP28E&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my video link above, I demonstrate how to scrape using Nokogiri and extract data. &lt;/p&gt;

&lt;p&gt;When it came to scraping the URL, I had to use a work around method for it to work. The URL I scraped was incomplete and my code broke. This is because the site excluded the beginning "https://..." that is necessary for Nokogiri to run properly. I hard coded the "https://..." portion to where the URL turns into an individual web address for that item.&lt;/p&gt;

&lt;p&gt;So the way my code reads is when the array_of_books is being iterated over and it searches for the URL code, if the return value is nil, then the program knows to add the hard coded line of code to complete the run.&lt;/p&gt;

</description>
      <category>cli</category>
      <category>scraping</category>
      <category>nokogiri</category>
      <category>openuri</category>
    </item>
    <item>
      <title>Why Software Engineering?</title>
      <dc:creator>Cassandra Parisi</dc:creator>
      <pubDate>Mon, 21 Dec 2020 02:25:12 +0000</pubDate>
      <link>https://dev.to/cparisi1290/why-software-engineering-40d9</link>
      <guid>https://dev.to/cparisi1290/why-software-engineering-40d9</guid>
      <description>&lt;p&gt;This year has been a season of reflection and change. I was working as a personal banker when the coronavirus broke out. This was a job I had a held for a year and a half. I’d received praise from my superiors, and was even given a promotion. Despite that success, I was unsure of whether a future in personal banking was really what I wanted for my life. People were unapologetically rude to me on an almost daily basis, and I had been a victim in multiple robberies. Frankly, it gave me a lot of anxiety. But changing careers is hard, I felt like I was excelling in my job, and I didn’t want to jump ship on my team.  &lt;/p&gt;

&lt;p&gt;When COVID hit the US, I was considered an essential worker, and continued to go into work at the branch. My bank took all the precautions to ensure we were protected, but being on the front lines made me uneasy. I was worried I might be increasing my chances of being exposed to the virus. Also, the ever-present threat of my branch suffering another robbery loomed over me as I read about millions of people losing their jobs. During the first few months of COVID, our branch’s lobby was closed and we served customers strictly through the drive-through. So that helped to ease some of my stress. But, as if it were a sign directed at me, telling me once and for all that I needed to get out, the very same week we opened the lobby back up to our customers, my branch was robbed. In the immortal words of the Doors, “The time to hesitate [was] through.”&lt;/p&gt;

&lt;p&gt;Software engineering was the first field that I considered that felt right, and for a variety of reasons. &lt;/p&gt;

&lt;p&gt;• The job outlook is promising - employment for software developers is projected to grow 22 percent from 2019 to 2029, much faster than the average for all occupations.(1)&lt;/p&gt;

&lt;p&gt;• The pay is pretty sweet - The median annual wage for software developers was $107,510 in May 2019. The lowest 10 percent earned less than $64,240, and the highest 10 percent earned more than $164,590.(2)&lt;/p&gt;

&lt;p&gt;• Software engineers can often work remotely—and who wouldn’t want to have the freedom do go on a road trip or vacation to the Bahamas and not have to use vacation time? Also, there are some foreign employers on the other side of the world who hire engineers in the US so they can have round-the-clock IT support. &lt;/p&gt;

&lt;p&gt;• I’ve also had an interest in coding ever since my teen years dabbling around customizing my MySpace page. That interest was deepened in my first job out of college, an accounting gig where I had to use Excel to build custom, automated financial reports for company executives. &lt;/p&gt;

&lt;p&gt;With all these stats in mind, I began to dream about what I would do with this particular set of skills. One goal I have upon completing this program is to find a company for which I could use my creativity to design the look of their website, and then use my technical abilities to sustain the site in line with the mission of the company. I want to build user friendly, professional looking websites that create positive experiences for customers and facilitate interactions between those customers and my company. &lt;/p&gt;

&lt;p&gt;My other goal is to begin freelancing to my friends and other entrepreneurs. I want to support those who are also following their passions. I want to work with people who uphold values similar to mine, who live and work with integrity.&lt;/p&gt;

&lt;p&gt;I want to work for companies who improve the lives of their customers and community through creative innovations, with disciplined and passionate employees. I believe that when people of similar values collaborate, communication comes easy and the drive to succeed is apparent within the group. When everyone is working towards a goal that’s bigger than any one individual can achieve on their own, the success becomes more than a career boost, it’s about the satisfaction of having made a positive impact that comes from creating a superior product or service. We need more of this in the world today.&lt;/p&gt;

&lt;p&gt;So here I am writing my first blog post, as a student of Flatiron School. &lt;/p&gt;

&lt;p&gt;(1) &lt;a href="https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm#tab-6"&gt;https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm#tab-6&lt;/a&gt;&lt;br&gt;
(2) &lt;a href="https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm#tab-5"&gt;https://www.bls.gov/ooh/computer-and-information-technology/software-developers.htm#tab-5&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
    </item>
  </channel>
</rss>
