<?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: saswat</title>
    <description>The latest articles on DEV Community by saswat (@saswat01).</description>
    <link>https://dev.to/saswat01</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F240861%2F163ab446-c64f-445c-bb36-7bab273b1579.jpeg</url>
      <title>DEV Community: saswat</title>
      <link>https://dev.to/saswat01</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saswat01"/>
    <language>en</language>
    <item>
      <title>Heroku streamlit app for single image dehazing</title>
      <dc:creator>saswat</dc:creator>
      <pubDate>Sun, 11 Jul 2021 07:26:25 +0000</pubDate>
      <link>https://dev.to/saswat01/heroku-streamlit-app-for-single-image-dehazing-4ak5</link>
      <guid>https://dev.to/saswat01/heroku-streamlit-app-for-single-image-dehazing-4ak5</guid>
      <description>&lt;p&gt;Hello guys, I have built an app using streamlit and hosted it on heroku. The web app helps you to dehaze hazy images of traffic on road(I will be extending to other use cases soon). It is working fine but it takes a lot of time to process the image. The algorithm works faster on PC but is slow on heroku. Any suggestions are welcome and appreciated. Thank you.&lt;/p&gt;

&lt;p&gt;Webapp: &lt;a href="https://image-dehazing.herokuapp.com/"&gt;https://image-dehazing.herokuapp.com/&lt;/a&gt;&lt;br&gt;
GitHub repo: &lt;a href="https://github.com/saswat01/imageDehaze-streamlit"&gt;https://github.com/saswat01/imageDehaze-streamlit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>heroku</category>
      <category>python</category>
    </item>
    <item>
      <title>Making the first ever web scraper</title>
      <dc:creator>saswat</dc:creator>
      <pubDate>Thu, 18 Jun 2020 16:13:37 +0000</pubDate>
      <link>https://dev.to/saswat01/making-the-first-ever-web-scraper-35ka</link>
      <guid>https://dev.to/saswat01/making-the-first-ever-web-scraper-35ka</guid>
      <description>&lt;p&gt;This is a comprehensive on point tutorial to get you started on web scraping. Before getting on our project we have to install some mandatory libraries. &lt;/p&gt;

&lt;p&gt;Let's get started.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Beautiful Soup&lt;/em&gt;&lt;br&gt;
So, &lt;a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/"&gt;beautiful soup&lt;/a&gt; package is the essence of web scraping and all we are about to do. Short intro- It's a python package to parse HTML and XML documents.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;em&gt;Requests&lt;/em&gt;&lt;br&gt;
&lt;a href="https://requests.readthedocs.io/en/master/"&gt;Requests&lt;/a&gt; is a python HTTP library to make HTTP and XML requests simple and convenient.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Now, we are done with installing all the ingredients that we need to cook our first web scraper. We will be using the &lt;a href="https://www.newegg.com/"&gt;newegg&lt;/a&gt; website to scrape the costs of graphics card that are available on the website.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;br&gt;
Hop on to your favourite editor and follow my lead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DLTiae64--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4ekgcpggcjydm4ziu0qq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DLTiae64--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4ekgcpggcjydm4ziu0qq.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's first import our libraries that we just pip-installed. &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;br&gt;
After importing the libraries, we have to make an HTTP request to the newegg website to scrape through. We will be using the requests library to make the request. When the request is approved we will parse the website using our beautiful soup library.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;&lt;br&gt;
Pheww, we are halfway down the road.&lt;/p&gt;

&lt;p&gt;Okay, now we have to do bit of an excercise. Navigate to this &lt;a href="https://www.newegg.com/global/in-en/p/pl?d=graphics+card"&gt;link&lt;/a&gt; and explore for real on this page. Let the information sink in. &lt;/p&gt;

&lt;p&gt;Now, open the developer tools of your browser(for chrome: &lt;a href="https://developers.google.com/web/tools/chrome-devtools/open"&gt;follow&lt;/a&gt;&lt;br&gt;
for firefox: &lt;a href="https://developer.mozilla.org/en-US/docs/Tools#:~:text=You%20can%20open%20the%20Firefox,%2B%20Opt%20%2B%20I%20on%20macOS."&gt;follow&lt;/a&gt;) and watch the code even if you don't understand and try finding where the prices would be hidden amongst these layers of code. Sorry, for sounding gloomy but as web scraper you have to develop this intuition.&lt;/p&gt;



&lt;p&gt;After you are done experimenting and playing around let's dig the website and do what we're supposed to do. So, we will use the beautiful soup library to find the price from our parsed website. And we wil repeat this step to extract the prices of all the graphics cards on the page.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Congratulations! You just made your first ever web scraper.&lt;/p&gt;

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

&lt;p&gt;Here is the full code:&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h6&gt;
  
  
  Note: Maybe your output was not clean but you got the prices. Try cleaning them and remove the unnecessarily spaces. Good Luck!
&lt;/h6&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
