<?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>Forem: Anuj Singh</title>
    <description>The latest articles on Forem by Anuj Singh (@anujssstw).</description>
    <link>https://forem.com/anujssstw</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%2F834133%2Fddfc033d-083d-4e0a-822e-6f7d7ca05057.jpeg</url>
      <title>Forem: Anuj Singh</title>
      <link>https://forem.com/anujssstw</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/anujssstw"/>
    <language>en</language>
    <item>
      <title>News Archiver</title>
      <dc:creator>Anuj Singh</dc:creator>
      <pubDate>Fri, 22 Apr 2022 14:02:21 +0000</pubDate>
      <link>https://forem.com/anujssstw/news-archiver-42a7</link>
      <guid>https://forem.com/anujssstw/news-archiver-42a7</guid>
      <description>&lt;h3&gt;
  
  
  Overview of My Submission
&lt;/h3&gt;

&lt;p&gt;Archives headlines/content from news websites (selected news website which are for now New18 and IndiaToday it can be change) every 3hr. which allows users to historically see the news and how it’s reported on different sites.&lt;br&gt;
By using a package node-schedule to run background job every 3hr. and &lt;strong&gt;puppeteer&lt;/strong&gt; for scraping the content from a website and this date will be saved in &lt;strong&gt;Appwrite&lt;/strong&gt; database.&lt;br&gt;
Render this data on a client-side application (website).&lt;/p&gt;
&lt;h3&gt;
  
  
  Submission Category:
&lt;/h3&gt;

&lt;p&gt;Web2 Wizards&lt;/p&gt;
&lt;h3&gt;
  
  
  Link to Code
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Frontend/Client-Side Application&lt;/strong&gt; &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AnujSsStw"&gt;
        AnujSsStw
      &lt;/a&gt; / &lt;a href="https://github.com/AnujSsStw/newsarchive-appwrite"&gt;
        newsarchive-appwrite
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h2&gt;
Haven't loaded the data for regular update&lt;/h2&gt;
&lt;h1&gt;
for that i have to host the app on a node server or with a appwrite droplete on digitalocean to regular collect the data from sites. MY DIGITALOCEAN CREDIT IS LOW SO I CAN'T HOST SORRY🙇‍♀️🙇
&lt;/h1&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/AnujSsStw/newsarchive-appwrite"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
 &lt;br&gt;&lt;br&gt;
&lt;a href="https://forappwrite--effulgent-florentine-2fb423.netlify.app/"&gt;Live website&lt;/a&gt; without data because I didn't host my application on a appwrite droplet to collect the data and display it sorry for that 🙇‍♀️.

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SZr-Abez--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0msgvmzmb8ylni4usfpg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SZr-Abez--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0msgvmzmb8ylni4usfpg.PNG" alt="Web app" width="880" height="424"&gt;&lt;/a&gt;&lt;br&gt;
&lt;u&gt;&lt;/u&gt;&lt;br&gt;
&lt;strong&gt;Backend/Server-Side Application&lt;/strong&gt; &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/AnujSsStw"&gt;
        AnujSsStw
      &lt;/a&gt; / &lt;a href="https://github.com/AnujSsStw/appwrite-backend"&gt;
        appwrite-backend
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vI59Tffv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6pnms8wzt4pvhp6do2aa.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vI59Tffv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6pnms8wzt4pvhp6do2aa.PNG" alt="Code" width="746" height="827"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;p&gt;Do check it out in 1.5x for a quick walkthrough on my application and how it works&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/1TiwWn6y-Mk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  A quick walk through of my Application and basically how it works
&lt;/h3&gt;

&lt;p&gt;PS- I didn't focus on security so that's why my id is still shows in main app. And if I have to I can just set it the .env&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run node index.js&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g8kmt4fc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7ueupl3d4l8ky6cbccc.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g8kmt4fc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7ueupl3d4l8ky6cbccc.PNG" alt="Image description" width="880" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cron schedule can be set to any time (for now let say every min * * * * *)&lt;/li&gt;
&lt;li&gt;After that it Scrape data mainly img and headline&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ruSejN9z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ajd3hemgtfru7nscns6s.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ruSejN9z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ajd3hemgtfru7nscns6s.PNG" alt="Image description" width="880" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now coming up it check the collection list

&lt;ul&gt;
&lt;li&gt;Basically for 1 things&lt;/li&gt;
&lt;li&gt;Does a collection exit with current date it if not then create a collection with given attributes &lt;/li&gt;
&lt;li&gt;If collection exits then create the document in that collection with the scraped data&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7_s8qsyx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8htmq76qbdiqwy41xhs.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7_s8qsyx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8htmq76qbdiqwy41xhs.PNG" alt="Image description" width="746" height="827"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--k3hofcnH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3uzn8lhqhdx9dqnfkxc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--k3hofcnH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3uzn8lhqhdx9dqnfkxc3.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HdZe7LkS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/999pwvovdgxgmtsair1y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HdZe7LkS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/999pwvovdgxgmtsair1y.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;That's it for the Backend&lt;br&gt;
&lt;strong&gt;Fontend&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Renders the data that was in collection&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LFS2ij50--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/byum1mb53a61ea12pgyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LFS2ij50--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/byum1mb53a61ea12pgyv.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;And how it render the data of the selected date?&lt;br&gt;
Well it's easy To start of I created the collection with Date id&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZqcXUuKb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nmixmdn7bwrl0j9utgqc.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZqcXUuKb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nmixmdn7bwrl0j9utgqc.PNG" alt="Image description" width="880" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more info you can connect with me on &lt;a href="https://twitter.com/anujzzZtw"&gt;Twitter&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  OoO
&lt;/h3&gt;

&lt;p&gt;The backend can be hosted on digitalocean so it can always keep running with appwrite droplet. If you are wondering.&lt;/p&gt;

</description>
      <category>appwritehack</category>
      <category>appwrite</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
