<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[Nick's Data Journey]]></title><description><![CDATA[I'm studying Data Science and sharing my learnings along the way]]></description><link>https://nicksdatajourney.com/</link><image><url>https://nicksdatajourney.com/favicon.png</url><title>Nick&apos;s Data Journey</title><link>https://nicksdatajourney.com/</link></image><generator>Ghost 5.47</generator><lastBuildDate>Fri, 27 Mar 2026 20:39:58 GMT</lastBuildDate><atom:link href="https://nicksdatajourney.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[How I made my first internet money]]></title><description><![CDATA[<p>I earned my first internet money. And I did it fully dressed in a regular office.</p><p>Recently, someone posted my <a href="https://www.freepublicapis.com/?ref=nicksdatajourney.com">API website</a> on Hacker News. The post stayed in third place for about 36 hours. As a result, over 30,000 visitors flooded to the site in a short period</p>]]></description><link>https://nicksdatajourney.com/how-i-made-my-first-internet-m/</link><guid isPermaLink="false">66d6ee65a758870509a8dbed</guid><dc:creator><![CDATA[Nick Schnee]]></dc:creator><pubDate>Tue, 03 Sep 2024 11:13:50 GMT</pubDate><media:content url="https://nicksdatajourney.com/content/images/2024/09/realtime_map_02.gif" medium="image"/><content:encoded><![CDATA[<img src="https://nicksdatajourney.com/content/images/2024/09/realtime_map_02.gif" alt="How I made my first internet money"><p>I earned my first internet money. And I did it fully dressed in a regular office.</p><p>Recently, someone posted my <a href="https://www.freepublicapis.com/?ref=nicksdatajourney.com">API website</a> on Hacker News. The post stayed in third place for about 36 hours. As a result, over 30,000 visitors flooded to the site in a short period of time.</p><p>Me? Excited. Of course, my server can handle this. After all, my website is hosted on a trendy cloud hosting service that automatically scales with the traffic. And the costs? They scale too. Panic.</p><p>In a hurry, I set up an ad slot. $250 for 30 days. It was gone in 5 minutes. Then I added a second one: $1,000 for 30 days. That one was gone in half an hour too.</p><p>The server costs are covered. And my website is being spread across the internet. The biggest industry newsletters, indie bloggers, and Italian IT companies are all writing about it.</p><p>The traffic only slightly decreases in the following days. And I start thinking about an ad concept for the future. I go ahead and set up a third ad slot.</p><p>That one&#x2019;s still available.</p>]]></content:encoded></item><item><title><![CDATA[How to find Free Public APIs for Developers and Students]]></title><description><![CDATA[<p></p><p>At the University of Applied Sciences of the Grisons (FHGR), our students are engaged in creating data stories&#x2014;simple websites that tell compelling narratives through data. To achieve this, they need reliable public data sources that provide real-time data, often accessed via APIs (Application Programming Interfaces). But where can</p>]]></description><link>https://nicksdatajourney.com/how-to-find-free-public-apis-for-developers-and-students/</link><guid isPermaLink="false">665f79d03c3b46204875ce1e</guid><dc:creator><![CDATA[Nick Schnee]]></dc:creator><pubDate>Thu, 06 Jun 2024 08:05:11 GMT</pubDate><media:content url="https://nicksdatajourney.com/content/images/2024/06/Screenshot-2024-06-06-at-09.46.11.png" medium="image"/><content:encoded><![CDATA[<img src="https://nicksdatajourney.com/content/images/2024/06/Screenshot-2024-06-06-at-09.46.11.png" alt="How to find Free Public APIs for Developers and Students"><p></p><p>At the University of Applied Sciences of the Grisons (FHGR), our students are engaged in creating data stories&#x2014;simple websites that tell compelling narratives through data. To achieve this, they need reliable public data sources that provide real-time data, often accessed via APIs (Application Programming Interfaces). But where can one find quality public data sources?</p><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">&#x1F680;</div><div class="kg-callout-text"><strong>tl;dr</strong> I built <strong><a rel="noreferrer" href="https://freepublicapis.com/?ref=nicksdatajourney.com">freepublicapis.com</a></strong> to provide reliable and free public APIs for students and developers. We list 100 APIs across various categories, tested daily for stability and performance.</div></div><p>While the internet is full of resources listing thousands of public APIs, their quality is often inconsistently checked, if at all. Consequently, many of these data sources become outdated, no longer publicly available, or cease to be free.</p><p>To address this issue, I developed <strong><a href="freepublicapis.com">freepublicapis.com</a></strong>&#x2014;a web app that lists free public APIs. What sets it apart? All APIs are tested every single day and ranked based on stability, error rate, and latency. If an API stops functioning, it is promptly removed from the site.</p><p>Currently, we have over 100 APIs listed, covering a wide range of categories for students and developers:</p><ul><li><strong>Weather</strong>: Get real-time and forecasted weather data.</li><li><strong>Public Data</strong>: Access open datasets from governments and organizations.</li><li><strong>Transportation</strong>: Information on public transportation systems worldwide.</li><li><strong>Finance</strong>: Retrieve market data, cryptocurrency prices, and financial statistics.</li><li><strong>Health</strong>: Access health-related information and data services.</li><li><strong>Entertainment</strong>: APIs for movies, TV shows, music, and more.</li><li><strong>Environment</strong>: Data on air quality, climate, and environmental conditions.</li><li><strong>Sports</strong>: Real-time sports data, including scores, statistics, and schedules.</li><li><strong>Gaming</strong>: APIs for game data, including trivia, character info, and game stats.</li><li><strong>Food &amp; Drink</strong>: Recipe databases, nutritional information, and more.</li><li><strong>Art &amp; Culture</strong>: Access to art collections, museums, and cultural data.</li><li><strong>Lifestyle</strong>: APIs for fashion, home, and lifestyle content.</li><li><strong>Animals</strong>: Data on pets, wildlife, and related content.</li><li><strong>Development</strong>: Tools and resources for developers, including testing and prototyping APIs.</li></ul><p>Does your company or city offer exciting public datasets? Add your favourite API to <strong><a href="https://freepublicapis.com/?ref=nicksdatajourney.com">freepublicapis.com</a></strong> and help us expand our repository of reliable public data sources.</p>]]></content:encoded></item><item><title><![CDATA[How to Downgrade to the Flex Plan in Mailgun in 2023]]></title><description><![CDATA[Don't want to pay $35 for sending out a few dozen emails a month? Me neither! Follow this step by step guide to downgrade to Mailgun's (very well) hidden Pay-As-You-Go plan.]]></description><link>https://nicksdatajourney.com/downgrade-mailgun/</link><guid isPermaLink="false">6459ff403c3b46204875cd0d</guid><category><![CDATA[Ghost CMS]]></category><dc:creator><![CDATA[Nick Schnee]]></dc:creator><pubDate>Tue, 09 May 2023 08:51:13 GMT</pubDate><media:content url="https://nicksdatajourney.com/content/images/2023/05/Xnapper-2023-05-09-11.00.53.png" medium="image"/><content:encoded><![CDATA[<img src="https://nicksdatajourney.com/content/images/2023/05/Xnapper-2023-05-09-11.00.53.png" alt="How to Downgrade to the Flex Plan in Mailgun in 2023"><p>Don&apos;t want to pay $35 for sending out a few dozen emails a month? Me neither! Follow this step by step guide to downgrade to Mailgun&apos;s (very well) hidden Pay-As-You-Go plan</p><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">&#x1F916;</div><div class="kg-callout-text"><strong>What the heck is Mailgun?</strong><br><br>Mailgun is a powerful email service provider that offers advanced features for sending, receiving, and tracking emails. Integrating Mailgun (or any other E-Mail service provider) with Self-Hosted Ghost CMS is necessary to let users sign up to your blog and send newsletters.</div></div><ol><li>Go to the <a href="https://app.mailgun.com/app/account/billing/plans?ref=nicksdatajourney.com">Billing section</a> in Mailgun or click on the big red Upgrade button (which will also take you to the Billing section).</li></ol><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/image-2.png" class="kg-image" alt="How to Downgrade to the Flex Plan in Mailgun in 2023" loading="lazy" width="510" height="262"></figure><p>2. In the Billing section, click on the cog next to the big green Upgrade button. Then click Unsubscribe.</p><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/image-6.png" class="kg-image" alt="How to Downgrade to the Flex Plan in Mailgun in 2023" loading="lazy" width="1740" height="932" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/image-6.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/image-6.png 1000w, https://nicksdatajourney.com/content/images/size/w1600/2023/05/image-6.png 1600w, https://nicksdatajourney.com/content/images/2023/05/image-6.png 1740w" sizes="(min-width: 720px) 720px"></figure><p>3. You will be asked once again, if you&apos;re really sure to unsubscribe. Yes, we are! Unsubscribing may take a while.</p><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/image-4.png" class="kg-image" alt="How to Downgrade to the Flex Plan in Mailgun in 2023" loading="lazy" width="1196" height="770" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/image-4.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/image-4.png 1000w, https://nicksdatajourney.com/content/images/2023/05/image-4.png 1196w" sizes="(min-width: 720px) 720px"></figure><p>4. After unsubscribing, you should see something like this. If you don&apos;t see this dialogue, try reloading the page where you pressed the red Unsubscribe button.</p><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/image-7.png" class="kg-image" alt="How to Downgrade to the Flex Plan in Mailgun in 2023" loading="lazy" width="1108" height="988" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/image-7.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/image-7.png 1000w, https://nicksdatajourney.com/content/images/2023/05/image-7.png 1108w" sizes="(min-width: 720px) 720px"></figure><p>5. Confirm by looking once again at the <a href="https://app.mailgun.com/app/account/billing/plans?ref=nicksdatajourney.com">Billing dashboard</a>, that your downgrade worked.</p><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/image-5.png" class="kg-image" alt="How to Downgrade to the Flex Plan in Mailgun in 2023" loading="lazy" width="1178" height="578" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/image-5.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/image-5.png 1000w, https://nicksdatajourney.com/content/images/2023/05/image-5.png 1178w" sizes="(min-width: 720px) 720px"></figure><h2 id="did-i-just-save-you-400-a-year">Did I just save you $400 a year?</h2><div class="kg-card kg-button-card kg-align-left"><a href="https://ko-fi.com/nickschnee?ref=nicksdatajourney.com" class="kg-btn kg-btn-accent">Buy me a Coffee</a></div>]]></content:encoded></item><item><title><![CDATA[How to enable E-Mail Signups on Self Hosted Ghost-CMS]]></title><description><![CDATA[I installed Ghost CMS on a Digital Ocean Droplet using the (probably not yet famous) One-Click-Installation. Using this method, my blog was up and running in minutes. However, I quickly realised something was off, because no users could sign up and no emails were sent.]]></description><link>https://nicksdatajourney.com/how-to-send-emails-from-self-hosted-ghost-cms/</link><guid isPermaLink="false">645961243c3b46204875cbc0</guid><category><![CDATA[Ghost CMS]]></category><dc:creator><![CDATA[Nick Schnee]]></dc:creator><pubDate>Mon, 08 May 2023 21:59:31 GMT</pubDate><media:content url="https://nicksdatajourney.com/content/images/2023/05/DALL-E-2023-05-08-23.58.56---a-header-image-for-a-blog--showing-a-e-mail-newsletter-or-letter-and-a-ghost--trending-on-artstation--digital-art-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://nicksdatajourney.com/content/images/2023/05/DALL-E-2023-05-08-23.58.56---a-header-image-for-a-blog--showing-a-e-mail-newsletter-or-letter-and-a-ghost--trending-on-artstation--digital-art-1.png" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS"><p>I installed Ghost CMS on a Digital Ocean Droplet using the (probably not yet famous) One-Click-Installation. Using this method, my blog was up and running in minutes. However, I quickly realised something was off, because no users could sign up and no emails were sent.</p><div class="kg-card kg-header-card kg-width-full kg-size-small kg-style-dark" style data-kg-background-image><h2 class="kg-header-card-header" id="tutorial">Tutorial</h2></div><p>What they don&apos;t tell you in the documentation is, that you need to configure your web-server (not only Mailgun), in order to be able to sign up new subscribers and send emails.</p><h1 id="first-verify-your-domain-with-mailgun">First, verify your Domain with Mailgun</h1><ol><li><strong>Sign up for a Mailgun account:</strong> Go to <a href="https://www.mailgun.com/?ref=nicksdatajourney.com">https://www.mailgun.com/</a> and sign up for a (free?) account if you don&apos;t have one already.</li><li><strong>Add and verify your domain:</strong> Follow the linked guide below to configure Mailgun for your domain. This process requires adding DNS records to your domain registrar.</li></ol><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://visioun.com/blog/setup-ghost-to-send-out-newsletter-email-with-mailgun/?ref=nicksdatajourney.com"><div class="kg-bookmark-content"><div class="kg-bookmark-title">Setup ghost to send out newsletter emails with Mailgun</div><div class="kg-bookmark-description">There are two types of emails in ghost. Transactional emails &amp; Newsletter orBulk emails. Transactional emails are mainly used for Sending the admin invite,Sign in/Sign up emails, etc. We have a blog post SMTP Setup to send outtransactional emails. Configure SMTP For Outbound Emails (Ghost SMTP S&#x2026;</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://visioun.com/blog/content/images/size/w256h256/2021/04/favicon.png" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS"><span class="kg-bookmark-author">Visioun Updates.</span><span class="kg-bookmark-publisher">Salehin Khan</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://visioun.com/blog/content/images/2021/10/gmn.png" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS"></div></a></figure><hr><h1 id="verified-lets-go">Verified? Let&apos;s go!</h1><ol><li><strong>Don&apos;t skip the last step of the guide above</strong>, and add your Mailgun configuration in your Ghost Admin. Go to:</li></ol><p><strong>Settings --&gt; Members --&gt; E-mail Newsletter</strong></p><p>It should look something like this:</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="https://nicksdatajourney.com/content/images/2023/05/image-1.png" class="kg-image" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS" loading="lazy" width="2000" height="758" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/image-1.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/image-1.png 1000w, https://nicksdatajourney.com/content/images/size/w1600/2023/05/image-1.png 1600w, https://nicksdatajourney.com/content/images/size/w2400/2023/05/image-1.png 2400w" sizes="(min-width: 720px) 720px"><figcaption><strong>Settings --&gt; Members --&gt; E-mail Newsletter</strong></figcaption></figure><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">&#x1F4A1;</div><div class="kg-callout-text">Make sure that you added the Sending API Key, instead of the Private API Key in the bottom field.</div></div><p>2.<strong> Obtain SMTP credentials: </strong>Once you made sure that your domain is verified, go to the Mailgun dashboard, click on your domain, and note down the following information:</p><ul><li>SMTP Hostname (e.g., smtp.eu.mailgun.org) (1)</li><li>Default SMTP Login (e.g., <a href="mailto:postmaster@yourdomain.com?ref=nicksdatajourney.com">postmaster@yourdomain.com</a>) (2)</li><li>Default Password (press the Reset password button to show) (3) </li></ul><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/image.png" class="kg-image" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS" loading="lazy" width="2000" height="919" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/image.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/image.png 1000w, https://nicksdatajourney.com/content/images/size/w1600/2023/05/image.png 1600w, https://nicksdatajourney.com/content/images/size/w2400/2023/05/image.png 2400w" sizes="(min-width: 720px) 720px"></figure><p><strong>4. Access your Ghost CMS configuration file:</strong> SSH into your Digital Ocean droplet (or other server) using a terminal or an SSH client like PuTTY. The command should look like this:</p><pre><code class="language-java">ssh root@your_droplet_ip
</code></pre><p><strong>5. Locate the Ghost CMS configuration file:</strong> The configuration file is usually named <code>config.production.json</code> and is located in the Ghost installation directory. By default, it should be in <code>/var/www/ghost</code>. Change to that directory using the following command:</p><pre><code class="language-php">cd /var/www/ghost
</code></pre><p><strong>6. Edit the configuration file:</strong> Open the <code>config.production.json</code> file using a text editor like nano:</p><pre><code class="language-undefined">nano config.production.json
</code></pre><p>Locate the <code>mail</code> section in the JSON file. It should look like this:</p><pre><code>&quot;mail&quot;: {
  &quot;transport&quot;: &quot;Direct&quot;
},</code></pre><p><strong>7. Update the mail configuration:</strong> Replace the existing <code>mail</code> section with the following, making sure to replace the placeholders with your actual Mailgun SMTP credentials:</p><pre><code class="language-json">&quot;mail&quot;: {
  &quot;transport&quot;: &quot;SMTP&quot;,
  &quot;options&quot;: {
    &quot;service&quot;: &quot;Mailgun&quot;,
    &quot;host&quot;: &quot;your_smtp_hostname&quot;,
    &quot;port&quot;: 587,
    &quot;secureConnection&quot;: false,
    &quot;auth&quot;: {
      &quot;user&quot;: &quot;your_smtp_login&quot;,
      &quot;pass&quot;: &quot;your_smtp_password&quot;
    }
  }
},</code></pre><p>Save and exit the editor: To do so, press <code>CTRL + X</code>, then <code>Y</code>, and finally <code>Enter</code> to save the changes and exit nano.</p><p><strong>8. Restart Ghost CMS: </strong>To apply the changes, restart Ghost using the following command:</p><pre><code class="language-undefined">ghost restart
</code></pre><p><strong>10. Test email sending:</strong> To test if emails are sent correctly, sign up as a new user with your second E-Mail address.</p><hr><h2 id="you-dont-have-to-pay-35-a-month-for-mailgun">You don&apos;t have to pay $35 a month for Mailgun</h2><p>Read my blog post on how to downgrade to Mailgun&apos;s (very well) hidden pay-as-you-go plan:</p><figure class="kg-card kg-bookmark-card"><a class="kg-bookmark-container" href="https://nicksdatajourney.com/downgrade-mailgun/"><div class="kg-bookmark-content"><div class="kg-bookmark-title">How to Downgrade to the Flex Plan in Mailgun in 2023</div><div class="kg-bookmark-description">Don&#x2019;t want to pay $35 for sending out a few dozen emails a month? Me neither! Follow this step by step guide to downgrade to Mailgun&#x2019;s (very well) hidden Pay-As-You-Go plan.</div><div class="kg-bookmark-metadata"><img class="kg-bookmark-icon" src="https://nicksdatajourney.com/content/images/size/w256h256/2023/05/logo_circle_white.7de52b4c.png" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS"><span class="kg-bookmark-author">Nick&apos;s Data Journey</span><span class="kg-bookmark-publisher">Nick Schnee</span></div></div><div class="kg-bookmark-thumbnail"><img src="https://nicksdatajourney.com/content/images/2023/05/Xnapper-2023-05-09-11.00.53.png" alt="How to enable E-Mail Signups on Self Hosted Ghost-CMS"></div></a></figure><hr><h2 id="like-what-you-see">Like what you see?</h2><div class="kg-card kg-button-card kg-align-left"><a href="https://nicksdatajourney.com/#/portal/signup/free" class="kg-btn kg-btn-accent">Come with me on my Journey</a></div><p></p><p></p><p></p><p><br></p>]]></content:encoded></item><item><title><![CDATA[Installing Selenium on a Mac to get started with Web Scraping]]></title><description><![CDATA[Learn how to install Chrome, Chromedriver and Selenium on a Mac.]]></description><link>https://nicksdatajourney.com/installing-selenium-2/</link><guid isPermaLink="false">6458f59ea833a716f5aa65b2</guid><category><![CDATA[Web Scraping]]></category><dc:creator><![CDATA[Nick Schnee]]></dc:creator><pubDate>Mon, 01 May 2023 15:17:47 GMT</pubDate><media:content url="https://images.unsplash.com/photo-1682794496831-81a52c8e9136?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNjgyOTUxNTIw&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" medium="image"/><content:encoded><![CDATA[<img src="https://images.unsplash.com/photo-1682794496831-81a52c8e9136?crop=entropy&amp;cs=tinysrgb&amp;fit=max&amp;fm=jpg&amp;ixid=MnwxMTc3M3wwfDF8YWxsfDN8fHx8fHwyfHwxNjgyOTUxNTIw&amp;ixlib=rb-4.0.3&amp;q=80&amp;w=2000" alt="Installing Selenium on a Mac to get started with Web Scraping"><p>In this tutorial, I will guide you through the process of installing Selenium on a Mac and using it in Python to search for smartwatches on Amazon.</p><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">&#x1F916;</div><div class="kg-callout-text"><strong>What is Selenium?</strong><br><br>Selenium is a powerful tool used for web scraping and browser automation. It&apos;s like a robot that can interact with websites, extract information, and perform actions just like a human would.<br><br>Selenium allows you to automate browser actions, such as clicking buttons, filling out forms, and navigating between pages. This makes it an excellent tool for tasks like data extraction (web scraping), web testing, and automating repetitive tasks on websites.<br><br></div></div><div class="kg-card kg-header-card kg-width-full kg-size-small kg-style-light" style data-kg-background-image><h2 class="kg-header-card-header" id="tutorial">Tutorial</h2></div><h1 id="install-chrome-chromedriver">Install Chrome &amp; Chromedriver</h1><p>To get started with Web Scraping on Mac OS, we need to install Google Chrome and Chromedriver. You can do this by running the following Bash-Script in your terminal.</p><div class="kg-card kg-callout-card kg-callout-card-blue"><div class="kg-callout-emoji">&#x1F916;</div><div class="kg-callout-text"><strong>What is Chromedriver?</strong><br><br>Chromedriver is a tool that helps you automate and control Google Chrome for tasks like web scraping and testing.<br><br></div></div><h3 id="1-copy-bash-script">1) Copy Bash Script </h3><p>First, copy the following code and create a new file called: <strong>mac_update_chromedriver_and_chrome.sh</strong></p><div class="kg-card kg-callout-card kg-callout-card-yellow"><div class="kg-callout-emoji">&#x1F451;</div><div class="kg-callout-text"><strong>Direct</strong> <strong>Download</strong><br>Registered members can directly download the Bash-Script-File for MacOS or Linux at the bottom of this blog post.</div></div><figure class="kg-card kg-code-card"><pre><code class="language-Bash">#!/bin/bash

# Check if Homebrew is installed, install if not
if ! command -v brew &amp;&gt; /dev/null; then
    echo &quot;Homebrew not found. Installing Homebrew...&quot;
    /bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;
fi

# Update Homebrew
brew update

# Install Google Chrome
if ! command -v google-chrome &amp;&gt; /dev/null; then
    echo &quot;Google Chrome not found. Installing Google Chrome...&quot;
    brew install --cask google-chrome
else
    echo &quot;Google Chrome already installed. Skipping...&quot;
fi

# Install Chromedriver
if ! command -v chromedriver &amp;&gt; /dev/null; then
    echo &quot;Chromedriver not found. Installing Chromedriver...&quot;
    brew install chromedriver
else
    echo &quot;Chromedriver already installed. Skipping...&quot;
fi

echo &quot;Installation complete!&quot;
</code></pre><figcaption>Save this script in a file called: mac_update_chromedriver_and_chrome.sh</figcaption></figure><h3 id="2-run-bash-script">2) Run Bash Script</h3><p>Now run your Bash-Script it from your <strong>Terminal</strong> app on Mac OS.</p><ol><li>Open the <strong>Terminal</strong> App and navigate to the directory where the script is located using the &quot;cd&quot; command</li></ol><pre><code>cd /Users/nick/Desktop</code></pre><p>2. Make the script executable by running the command: </p><pre><code>chmod +x update_chromedriver_and_chrome.sh</code></pre><div class="kg-card kg-toggle-card" data-kg-toggle-state="close"><div class="kg-toggle-heading"><h4 class="kg-toggle-heading-text">What does the &apos;chmod&apos; command do?</h4><button class="kg-toggle-card-icon"><svg id="Regular" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24"><path class="cls-1" d="M23.25,7.311,12.53,18.03a.749.749,0,0,1-1.06,0L.75,7.311"/></svg></button></div><div class="kg-toggle-content"><p>chmod is a command in MacOs and Linux that stands for &quot;change mode&quot;. It is used to change the permissions of files and directories.</p><p>The chmod command allows you to set permissions for three different types of users: the owner of the file, members of the group that the file belongs to, and all other users.</p><p>The permissions that can be set using chmod are read (r), write (w), and execute (x). These permissions can be set or removed for each of the three types of users.</p><p>For example, the command &quot;chmod +x myscript.sh&quot; would add the execute permission to the file &quot;myscript.sh&quot;, allowing the user to run the script.</p></div></div><p>3. Run the script by typing the command:</p><pre><code>./update_chromedriver_and_chrome.sh</code></pre><p>When running the script for the first time, you may encounter the following error message:</p><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/Xnapper-2023-05-01-14.02.24.png" class="kg-image" alt="Installing Selenium on a Mac to get started with Web Scraping" loading="lazy" width="1856" height="1044" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/Xnapper-2023-05-01-14.02.24.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/Xnapper-2023-05-01-14.02.24.png 1000w, https://nicksdatajourney.com/content/images/size/w1600/2023/05/Xnapper-2023-05-01-14.02.24.png 1600w, https://nicksdatajourney.com/content/images/2023/05/Xnapper-2023-05-01-14.02.24.png 1856w" sizes="(min-width: 720px) 720px"></figure><p>If you encounter this error, navigate to:</p><p><strong>&quot;System Preferences&quot; </strong>--&gt; &quot;<strong>Security &amp; Privacy</strong>&quot;</p><p>and click &quot;<strong>Allow Anyway&quot;</strong></p><figure class="kg-card kg-image-card"><img src="https://nicksdatajourney.com/content/images/2023/05/Xnapper-2023-05-01-14.04.48.png" class="kg-image" alt="Installing Selenium on a Mac to get started with Web Scraping" loading="lazy" width="2000" height="1125" srcset="https://nicksdatajourney.com/content/images/size/w600/2023/05/Xnapper-2023-05-01-14.04.48.png 600w, https://nicksdatajourney.com/content/images/size/w1000/2023/05/Xnapper-2023-05-01-14.04.48.png 1000w, https://nicksdatajourney.com/content/images/size/w1600/2023/05/Xnapper-2023-05-01-14.04.48.png 1600w, https://nicksdatajourney.com/content/images/size/w2400/2023/05/Xnapper-2023-05-01-14.04.48.png 2400w" sizes="(min-width: 720px) 720px"></figure><p>Now run your bash script again using the command:</p><pre><code>./update_chromedriver_and_chrome.sh</code></pre><h2 id="3-check-if-installation-was-successful">3) Check if Installation was Successful</h2><p>Run the following code in your terminal to check if the installation of Chrome &amp; Chromedriver was successful:</p><pre><code>/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version &amp;&amp; chromedriver --version </code></pre><h2 id="4-install-selenium-in-python-environment">4) Install Selenium in Python Environment</h2><p>First, activate your Python-Environment. Replace &apos;nicks-env&apos; with your own python environment you&apos;d like to use:</p><pre><code>source venv/nicks-env/bin/activate</code></pre><p>And install selenium using</p><pre><code>pip install selenium</code></pre><h2 id="5-run-a-little-test-script">5) Run a little test script</h2><p>This script opens Chrome, goes to <a href="https://amazon.com/?ref=nicksdatajourney.com">amazon.com</a> and searches for &apos;smartwatch&apos;.</p><p><strong>Note</strong> that the script uses the &apos;time&apos; library, so you might to &apos;pip install time&apos; first.</p><pre><code>from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time

print(&quot;start&quot;)
driver = webdriver.Chrome()

url = &apos;https://www.amazon.com&apos;

driver.get(url)

time.sleep(1)

driver.find_element(by=By.XPATH, value=&apos;//*[@id=&quot;twotabsearchtextbox&quot;]&apos;).send_keys(&apos;smartwatch&apos;)

time.sleep(1)

driver.find_element(by=By.XPATH, value=&apos;//*[@id=&quot;nav-search-submit-button&quot;]&apos;).click()

time.sleep(5)

driver.close()

print(&quot;end&quot;)</code></pre><p>If you see &apos;start&apos; and &apos;end&apos; printed in the console, everything worked as expected.</p><div class="kg-card kg-header-card kg-width-full kg-size-small kg-style-light" style data-kg-background-image><h2 class="kg-header-card-header" id="additional-resources">Additional Resources</h2><h3 class="kg-header-card-subheader" id="subscribe-to-this-blog-and-my-free-newsletter-to-get-additional-resources">Subscribe to this Blog and my Free Newsletter to get Additional Resources</h3></div><ul><li>For Mac: File Update Chromedriver and Chrome</li><li>For Linux: File Update Chromedriver and Chrome</li></ul>]]></content:encoded></item></channel></rss>