<?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: Albert Ulysses</title>
    <description>The latest articles on DEV Community by Albert Ulysses (@albertulysses).</description>
    <link>https://dev.to/albertulysses</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%2F303444%2F12425628-02cd-4a50-b875-172247367487.jpeg</url>
      <title>DEV Community: Albert Ulysses</title>
      <link>https://dev.to/albertulysses</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/albertulysses"/>
    <language>en</language>
    <item>
      <title>Data Pipelines with Apache Airflow - Book Review</title>
      <dc:creator>Albert Ulysses</dc:creator>
      <pubDate>Mon, 13 Jun 2022 22:12:14 +0000</pubDate>
      <link>https://dev.to/albertulysses/data-pipelines-with-apache-airflow-book-review-3b0h</link>
      <guid>https://dev.to/albertulysses/data-pipelines-with-apache-airflow-book-review-3b0h</guid>
      <description>&lt;h3&gt;
  
  
  The Book:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.manning.com/books/data-pipelines-with-apache-airflow"&gt;Data Pipelines with Apache Airflow&lt;/a&gt; By Bas HarenSlak &amp;amp; Julian de Ruiter&lt;/p&gt;

&lt;h3&gt;
  
  
  Short Summary:
&lt;/h3&gt;

&lt;p&gt;"Data Pipelines with Apache Airflow" is an introductory and intermediate book about Apache Airflow. The book covers everything from introducing Airflow to giving some excellent ideas for generic use cases. The book has four parts: "Getting Started," "Beyond the Basics," "Airflow in Practice," and "In the Clouds." "Getting Started" and "Beyond the Basics," detail Airflow- such as how to use the framework and interacting with DAGs. "Airflow in Practice" also has some Airflow details but focuses more on the practical parts of Airflow, such as security. "In the Clouds" give examples of deploying a project using AWS, Azure, and GCP.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I liked:
&lt;/h3&gt;

&lt;p&gt;The first two parts are excellent - the authors do a great job explaining Airflow. I learned so much that I was able to use immediately. Airflow is such a massive framework, but somehow, they were able to condescend all the essential concepts into these two parts without going into unnecessary topics. &lt;/p&gt;

&lt;h3&gt;
  
  
  What I disliked:
&lt;/h3&gt;

&lt;p&gt;The last two parts went into some detail but didn't work for me as much as they assume a lot about your project. I understand the thinking behind these parts - they wanted to show examples and starting points - but for me, a lot of it was irrelevant. The only chapter I admit to skipping is chapter 17 because it discusses deployment in Azure, and I don't see myself using Azure anytime soon. &lt;/p&gt;

&lt;h3&gt;
  
  
  Review round-up:
&lt;/h3&gt;

&lt;p&gt;This book is excellent for anyone working with Apache Airflow. Although I couldn't say the last two parts worked for me, the authors say in their "About this Book" that after chapter five, the reader can read what they feel is necessary. So perhaps, I overread what I needed/ overread what the Authors suggested, and I don't think it takes away from everything you can learn from this book. Again the first two parts are more than worth it, and if you decide to read the book, skim the chapters and see if you need to read the entire book. &lt;/p&gt;

&lt;h3&gt;
  
  
  Rating:
&lt;/h3&gt;

&lt;p&gt;8/10 Python Snakes&lt;/p&gt;

</description>
      <category>python</category>
      <category>dataengineering</category>
      <category>books</category>
      <category>bigdata</category>
    </item>
    <item>
      <title>Practices of the Python Pro - Book Review</title>
      <dc:creator>Albert Ulysses</dc:creator>
      <pubDate>Tue, 01 Mar 2022 18:04:12 +0000</pubDate>
      <link>https://dev.to/albertulysses/practices-of-the-python-pro-book-review-2dn7</link>
      <guid>https://dev.to/albertulysses/practices-of-the-python-pro-book-review-2dn7</guid>
      <description>&lt;h2&gt;
  
  
  The Book:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.manning.com/books/practices-of-the-python-pro"&gt;Practices of the Python Pro&lt;/a&gt; By Dane Hillard&lt;/p&gt;

&lt;h2&gt;
  
  
  Short Summary:
&lt;/h2&gt;

&lt;p&gt;"Practices of the Python Pro" is a book to teach developers about better software practices. The title is a bit misleading because it suggests that the book is about writing better Python code; it's actually about good Software practices and uses Python as the medium. The book has three main parts and a fourth closing part. The first part is about why designing software matters - basically an argument for why someone needs to learn the material in the book. The second talks broadly about the concepts, and the third goes into detail. The book ends with suggestions to the reader about where to go next.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I liked:
&lt;/h2&gt;

&lt;p&gt;I thought the book was great. As I said, the title is a bit misleading, but the material is excellent. I liked the concepts the second part covers, including separation of concerns, abstraction, and encapsulation, designing for high performance (speed testing), and different types of testing (such as unit versus integration). The third part was also noteworthy- it talks about how to improve your code and gets into more specific problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I disliked:
&lt;/h2&gt;

&lt;p&gt;The one problem with the book is the title. It should be named "Best Software Development Practices with examples in Python."&lt;br&gt;&lt;br&gt;
The title should emphasize that it's more about software development and uses Python as its learning tool. &lt;/p&gt;

&lt;h2&gt;
  
  
  Review round-up:
&lt;/h2&gt;

&lt;p&gt;The material is vital for Python developers, and even as an intermediate developer myself, it helped reinforce many other concepts I've learned elsewhere. I appreciate that it's not at all complex to understand. It's a book that was missing in the Python community. Many second/intermediate Python books give you particular use cases, but this book gives you a view above that and helps organize and think about your software as a whole. I can see myself re-reading this book in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rating:
&lt;/h2&gt;

&lt;p&gt;9/10 Python Snakes&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Thinking in Pandas - Book Review</title>
      <dc:creator>Albert Ulysses</dc:creator>
      <pubDate>Mon, 01 Nov 2021 19:58:06 +0000</pubDate>
      <link>https://dev.to/albertulysses/thinking-in-pandas-book-review-5c7</link>
      <guid>https://dev.to/albertulysses/thinking-in-pandas-book-review-5c7</guid>
      <description>&lt;h2&gt;
  
  
  The Book:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://link.springer.com/book/10.1007/978-1-4842-5839-2"&gt;Thinking in Pandas&lt;/a&gt; By Hannah Stepanek&lt;/p&gt;

&lt;h2&gt;
  
  
  Short Summary:
&lt;/h2&gt;

&lt;p&gt;"Thinking in Pandas" is a book written on how to optimize your Pandas code. It starts with an introduction to the Pandas library, the basics of loading/merging, and how Pandas works under the hood. The middle chapters detail the typical things you would use Pandas for and how to optimize those operations. It ends with ways that you can use tools outside of the library for speed and the library's future.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I liked:
&lt;/h2&gt;

&lt;p&gt;I like the detail that Hannah went into because it helped me understand the library as a whole. It wasn't a cookbook-style book, but more like a course on Pandas and why one thing is better. I also enjoyed the diverse set of optimizations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I disliked:
&lt;/h2&gt;

&lt;p&gt;Although the overall book is excellent, there were two things that I wish I could change. First are the code examples. Aesthetically they were tough on the eyes. They could have done a little more work on making it look nice. Second, Hannah doesn't dive into distributed solutions for large datasets. I like to think that most people will use Spark for their distributed solutions, but those interested in using only Pandas can use a library like Dask. &lt;/p&gt;

&lt;h2&gt;
  
  
  Review round-up:
&lt;/h2&gt;

&lt;p&gt;This book is necessary for any Data Engineer or a Pandas user interested in developing better habits. The book has some shortcomings, but they aren't enough to warrant skipping this book. I used some of the suggestions immediately, and I'm grateful for all the work Hannah put into it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rating:
&lt;/h2&gt;

&lt;p&gt;8/10 Python Snakes&lt;/p&gt;

</description>
      <category>python</category>
      <category>datascience</category>
      <category>books</category>
    </item>
    <item>
      <title>Functional Programming in Python - Book Review</title>
      <dc:creator>Albert Ulysses</dc:creator>
      <pubDate>Wed, 14 Jul 2021 00:41:00 +0000</pubDate>
      <link>https://dev.to/albertulysses/functional-programming-in-python-book-review-59o9</link>
      <guid>https://dev.to/albertulysses/functional-programming-in-python-book-review-59o9</guid>
      <description>&lt;h1&gt;
  
  
  The Book:
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://leanpub.com/functionalprogramminginpython"&gt;Functional Programming In Python&lt;/a&gt; By Martin McBride&lt;/p&gt;

&lt;h2&gt;
  
  
  Short Summary:
&lt;/h2&gt;

&lt;p&gt;"Functional Programming in Python" is a short book on writing code and solving problems using Python in a Functional Programming(FP) idiom. The first chapter goes over the three main paradigms - procedure programming, object-oriented programming, and FP. After the first chapter, we get into FP Fundamentals and how to express them in Python. The longer middle chapters go deep into iterators and iterables. The book ends with several chapters that dive into FP ideas that don't necessarily apply to Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I liked:
&lt;/h2&gt;

&lt;p&gt;There were several things I liked about how the author wrote the book. First, I like how the chapters are formatted. It is nice to know that the last chapters aren't necessary for Python but interesting nonetheless. I also enjoyed how the author explained the concepts. I feel as if I can implement these ideas reasonably soon. It was a good weekend book that didn't need a lot of focus to understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I disliked:
&lt;/h2&gt;

&lt;p&gt;I didn't dislike much about the book. If there was one thing that I would comment on, it was on the chapters about iterator functions. I'm not sure what the thought process is to give so much space to explain the different functions, and it didn't make a clear connection to FP. Perhaps my comprehension is lacking, but I had a hard time connecting the two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Review round-up:
&lt;/h2&gt;

&lt;p&gt;I would suggest any intermediate Python developer interested in exploring FP concepts in Python read this book. It's not a beginner book, nor do I think anyone with solid FP knowledge would gain much out of reading it. &lt;/p&gt;

&lt;h2&gt;
  
  
  Rating:
&lt;/h2&gt;

&lt;p&gt;7/10 Python Snakes&lt;/p&gt;

</description>
      <category>python</category>
      <category>functional</category>
      <category>books</category>
    </item>
    <item>
      <title>Unit Testing Your Web Scraper</title>
      <dc:creator>Albert Ulysses</dc:creator>
      <pubDate>Fri, 13 Nov 2020 04:48:37 +0000</pubDate>
      <link>https://dev.to/albertulysses/unit-testing-your-web-scraper-1aha</link>
      <guid>https://dev.to/albertulysses/unit-testing-your-web-scraper-1aha</guid>
      <description>&lt;h2&gt;
  
  
  Goals:
&lt;/h2&gt;

&lt;p&gt;By the end of this tutorial, you will have a starting point for writing unit tests for a web scraper. I also hope that this motivates the reader to learn more about test-driven development. This tutorial is less about teaching you how to do something. Instead, it suggests how to set up and think about your testing for web scrapping scripts. &lt;/p&gt;

&lt;h2&gt;
  
  
  Tools and prereqs:
&lt;/h2&gt;

&lt;p&gt;The reader should know how to run pytests, if you don't, I suggest you read the first part of clean architecture for a primer listed in the resources section.&lt;br&gt;
It will benefit the reader to have done at least one web scrape using Beautiful Soup before going over this tutorial. &lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;The example website we will be using is &lt;a href="https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html" rel="noopener noreferrer"&gt;https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html&lt;/a&gt;. This website is a service to practice web scraping.&lt;br&gt;
The first step is to decide what data we will want to collect. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsv0yk6rnfkvj3d4w5vmu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsv0yk6rnfkvj3d4w5vmu.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Luckily, the "Product information" section makes it an easy task. We will collect the fields: UPC, Product Type, Price (excl. tax), Tax, and Availability In stock.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;My first suggestion begins before we start writing any code. I think all of your cleaning code should be organized together and tested together. Therefore you should separate your cleaning code in a "clean.py" file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;touch clean.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;With Test-Driven Development, you write your test before writing your program code. I like using a format similar to follow Ken Youens' format in "Tiny Python Project" (link below). He starts with testing that the file exists in the right location. He then separates each of the tests with a commented outline.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import os

prg = './clean.py'


# -------------------------------------------------
def test_exists():
    """checks if the file exist"""

    assert os.path.isfile(prg)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can run the test by typing this:&lt;br&gt;
&lt;code&gt;pytest -xv test.py&lt;/code&gt;&lt;br&gt;
This test should pass, if it doesn't make sure the &lt;code&gt;clean.py&lt;/code&gt; is in the correct directory.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4
&lt;/h3&gt;

&lt;p&gt;For the next step, we will be going back to the Product Information section of the webpage.  When storing our Price and tax data, we will want to keep them as float data. However, if we tried to get the text, the pound symbol would prevent python from converting it into a float number. This problem lends itself to our first test.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# -------------------------------------------------
def test_price():
    """£51.77 -&amp;gt; 51.77 type float"""

    res = monetary('£51.77')
    assert res == float(51.77)`

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now when we run the test using:&lt;br&gt;
&lt;code&gt;pytest -xv test.py&lt;/code&gt; . We will see an error, which is a great thing. &lt;/p&gt;

&lt;p&gt;I want to take the time to discuss this step a little more because this step is the main focus of the tutorial. There are much better TDD sources and excellent web scraping tutorials, but I don't always see where to start with TDD for your scrapes. Starting with how you want your data to look is a great way to get started with TDD and a great way to ensure your data is clean. As a data analyst, data engineer, or data scientist, there will most likely be several cleaning data steps. Web getting your data from the web; this can be your first step. &lt;br&gt;
I know I got a bit wordy, but I would like to summarize these thoughts and the tutorial: write a test script to reflect what your data should look like and then write the code.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 5
&lt;/h3&gt;

&lt;p&gt;Now we can write the code for this test. This code is how I chose to write the code; there can be more than one way. When I write code for small projects, I like to think of two advice pieces that I have read from real smart developers. First, get the code to pass the test and make sure it does what you are trying to get done. Second, is don't overcomplicate it with features you think you'll need in the future. Here is my code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import re


def monetary(value_field):
    """Returns a float for items that are values"""
    amount = re.sub('[^0-9.]', '', value_field)
    return float(amount)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sure, I could have written it this way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def monetary(value_field):
    """Returns a float for items that are values"""
    amount = value_field[1:]
    return float(amount)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and for this project, it would be fine. I used regrex, because any time I see characters, I think to myself, "just use regrex". However, it doesn't matter as long as you are getting the desired result.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6:
&lt;/h3&gt;

&lt;p&gt;Now it is time for you to do the same thing for writing a test and code that returns an integer for the availability column! You can see my complete code and "answer" at the link below under resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We went over a starting point to create Unit tests for a web scraper. Thank you for reading and please let me know if you have any questions our suggestions!&lt;/p&gt;

&lt;h4&gt;
  
  
  Quick side note
&lt;/h4&gt;

&lt;p&gt;In my project, I save the data as a NamedTuple in a model file. There will be a link at the end of this article with more information about NamedTuples if you have not used one before.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources:
&lt;/h2&gt;

&lt;p&gt;Clean Architectures: &lt;br&gt;
&lt;a href="https://leanpub.com/clean-architectures-in-python" rel="noopener noreferrer"&gt;https://leanpub.com/clean-architectures-in-python&lt;/a&gt;&lt;br&gt;
Tiny Python Projects:&lt;br&gt;
 &lt;a href="https://github.com/kyclark/tiny_python_projects" rel="noopener noreferrer"&gt;https://github.com/kyclark/tiny_python_projects&lt;/a&gt;&lt;br&gt;
NamedTuple:&lt;br&gt;
&lt;a href="https://dbader.org/blog/writing-clean-python-with-namedtuples" rel="noopener noreferrer"&gt;https://dbader.org/blog/writing-clean-python-with-namedtuples&lt;/a&gt;&lt;br&gt;
My code:&lt;br&gt;
&lt;a href="https://github.com/AlbertUlysses/beautiful-test" rel="noopener noreferrer"&gt;https://github.com/AlbertUlysses/beautiful-test&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>tdd</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Web Scraping with Python - Reproducing Requests </title>
      <dc:creator>Albert Ulysses</dc:creator>
      <pubDate>Thu, 15 Oct 2020 05:56:46 +0000</pubDate>
      <link>https://dev.to/albertulysses/web-scraping-with-python-reproducing-requests-2395</link>
      <guid>https://dev.to/albertulysses/web-scraping-with-python-reproducing-requests-2395</guid>
      <description>&lt;p&gt;Have you noticed a gap in knowledge between learning how to scrape and practicing with your first project?&lt;br&gt;
An introduction tutorial teaches us how to scrape using Beautiful Soup or Scrapy on simple HTML data. After completion, we think to ourselves,  "Finally, all the data in the World Wide Web is mine." &lt;br&gt;
Then BAM, the first page you want to scrape, is a dynamic webpage. &lt;br&gt;
From there, you will probably start reading about "how you need Selenium," but first, you need to learn Docker. The problem then gets messier because you're using a Windows machine, so is the community version even supported? The result is an avalanche of more unanswered questions, and we abandon the project altogether. &lt;br&gt;
I'm here to tell you that there is a technique that lies between using HTML scraping tools and learning Selenium that you can try before jumping ship. Best of all, it's probably a technology you already know - Requests. &lt;/p&gt;
&lt;h2&gt;
  
  
  Goals:
&lt;/h2&gt;

&lt;p&gt;By the end of this tutorial, you'll learn how to mimic a website's request to get more HTML pages or JSON data. &lt;br&gt;
Disclaimer, in some cases, the website will still need to use Selenium or other technologies for web scraping.&lt;/p&gt;
&lt;h2&gt;
  
  
  Overview:
&lt;/h2&gt;

&lt;p&gt;The method is a three-step procedure.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First, we will check if the website is the right candidate for this technique.&lt;/li&gt;
&lt;li&gt;Second, we will examine the request and return data using Postman.&lt;/li&gt;
&lt;li&gt;Third, we will write the python code.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Tools and prereqs:
&lt;/h2&gt;

&lt;p&gt;Postman&lt;br&gt;
A basic understanding of Web Scraping &lt;br&gt;
A basic understanding of Python's Requests library&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;My browser is Firefox, but I'm sure Chrome has a similar feature. Under the Web developer option, select the network option. &lt;/p&gt;

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

&lt;p&gt;Generate dynamic data and examine the requests. For my example webpage, you can invoke this by selecting an option.&lt;/p&gt;

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

&lt;p&gt;Now, you might have noticed that many requests are happening. So how do you find the one you need? The trick here is to look at the type and the response itself. In my example, there are many js (Javascript) types and two HTML types. Since we are trying to avoid dealing with Javascript, it is a natural move for us first to inspect the two HTML options. &lt;br&gt;
Luckily, the first HTML type is the request we need. We can tell that it's the right choice because we can see the data we want in the response. &lt;/p&gt;

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

&lt;p&gt;Next, we will use Postman to mimic the request. We do this to isolate, inspect, and confirm that this is the data we need.&lt;br&gt;
With Firefox, we right-click to copy and select the URL option.Then paste into Postman with the right request type. &lt;/p&gt;

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

&lt;p&gt;Right-click to copy and select data form. &lt;/p&gt;

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

&lt;p&gt;In some cases, you might need to add something to the header, but Postman autocompletes a lot. So in this example, it's not necessary.&lt;br&gt;
Then run it. &lt;/p&gt;

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

&lt;p&gt;The data looks good. It's a dedicated HTML page that we can scrape.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;The last step is writing the python code. Because this isn't a Request or Python tutorial, I'm not going to get detailed in this step, but I will tell you what I did.&lt;br&gt;
I messed with the requests a bit and realized that I could get the same data without the county code, so my data form is numerical. Which means using a range is just fine. &lt;br&gt;
Here is my code for creating a request that gets all the HTML for all those pages.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import requests
import json
request_list = []
for i in range(1,84):
    response = requests.post(f"https://mvic.sos.state.mi.us/Voter/SearchByCounty?CountyID={i}", verify=False)
    request_list.append(response.text)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this, we can use a combination of an HTML parser and requests to retrieve dynamic data.&lt;/p&gt;

&lt;h4&gt;
  
  
  BONUS tip:
&lt;/h4&gt;

&lt;p&gt;Here is a website that can turn cURL requests into Python code. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://curl.trillworks.com/"&gt;https://curl.trillworks.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cool, right? You can use this if your request is simple, or you just are feeling lazy. Be warned, it doesn't work all the time, and some headers may need to be adjusted still.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;We went over how to use a web browser, Postman, and the Request library to continue your web scraping journey. An intermediate technique for those who are learning Web Scraping. Good Luck!&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>datascience</category>
    </item>
  </channel>
</rss>
