Scraping Using Python in Step by step approach
Tags: python, cybersecurity, scraping, webdev
Published: 2023-07-21 06:26:54

<p data-pm-slice="1 3 []">Scraping should be about <a class="attrlink" href="https://www.zenrows.com/blog/mastering-web-scraping-in-python-from-zero-to-hero?utm_source=medium.com&amp;utm_medium=social&amp;utm_campaign=republishing" target="_blank" rel="noopener noreferrer nofollow">extracting content from HTML</a>. It sounds simple but has many obstacles. The first one is to obtain the said HTML. For that, we’ll use <strong>Python to avoid detection</strong>.</p>
That might require bypassing anti-bot systems. Web scraping without getting blocked using Python, or any other tool, isn’t a walk in the park.

Websites tend to protect their data and access. Defensive systems could take many possible actions. Stay with us to learn how to mitigate their impact <strong>or directly bypass bot detection using </strong><a class="attrlink" href="https://requests.readthedocs.io/en/latest/" target="_blank" rel="noopener noreferrer nofollow"><strong>Requests</strong></a><strong> or </strong><a class="attrlink" href="https://github.com/microsoft/playwright" target="_blank" rel="noopener noreferrer nofollow"><strong>Playwright</strong></a>.

<strong>Note:</strong> when testing at scale, never use your home IP directly. A small mistake or slip, and you will get banned.

Also, this is for information purposes, and make sure you use it on an authorized website or platform.

<img src="https://miro.medium.com/v2/resize:fit:700/1*TIT84bxhasTWgbwfvm1pXg.png" align="left" />
<h1><strong>Prerequisites</strong></h1>
For the code to work, you’ll need <a class="attrlink" href="https://www.python.org/downloads/" target="_blank" rel="noopener noreferrer nofollow">Python 3 installed</a>. Some systems have it pre-installed. After that, install all the necessary libraries by running pip install.
<pre><code class="language-python">pip install requests playwright 
npx playwright install</code></pre>
<h1><strong>IP Rate Limit</strong></h1>
The most basic security system is to ban or throttle requests from the same IP. It means a regular user wouldn’t request a hundred pages in a few seconds, so that connection will be tagged as dangerous.
<pre><code class="language-python">import requests 

response = requests.get('http://httpbin.org/ip') 
print(response.json()['origin']) 
# xyz.84.7.83</code></pre>
IP rate limits work similarly to API rate limits, but there is usually no public information about them. We can’t know for sure how many requests we can make safely.

Our Internet Service Provider assigns us our IP, which we can’t affect or mask. The solution is to change it. We can’t modify a machine’s IP, but we can use different machines. Datacenters might have different IPs, although that isn’t a real solution.

Proxies are. They take an incoming request and relay it to the final destination. It does no processing there. But that is enough to mask our IP and bypass the block since the target website will see the proxy’s IP.
<h3><strong>Rotating Proxies</strong></h3>
There are <a class="attrlink" href="https://free-proxy-list.net/" target="_blank" rel="noopener noreferrer nofollow">free proxies</a>, even though we don’t recommend them. They might work for testing but aren’t reliable. We can use some of those for testing, as seen in some examples.

Now we have a different IP, and our home connection is safe and sound. Good. But what if they block the proxy’s IP? We’re back to the initial position.

We won’t go into detail about free proxies. Just use <a class="attrlink" href="https://free-proxy-list.net/" target="_blank" rel="noopener noreferrer nofollow">the next one on the list</a>. Change them frequently since their lifespan is usually short.

<strong>Paid proxy services, on the other hand, offer IP rotation</strong>. Our service would work similarly, but the website would see a different IP. In some cases, they <strong>rotate for every request or every few minutes</strong>. In any case, they’re much harder to ban. And when it happens, we’ll get a new IP quickly.
<pre><code class="language-python">import requests 

proxies = {'http': 'http://190.64.18.177:80'} 
response = requests.get('http://httpbin.org/ip', proxies=proxies) 
print(response.json()['origin']) # 190.64.18.162</code></pre>
We know about these; it means bot detection services also know about them. Some big companies will block traffic from known proxy IPs or datacenters. For those cases, there is a higher proxy level: residential.

Residential proxies are more expensive and sometimes bandwidth-limited, but they offer us IPs used by regular people. That implies that our mobile provider could assign us that IP tomorrow. Or a friend had it yesterday. They’re indistinguishable from actual final users.

We can scrape whatever we want, right? The cheaper ones by default, the expensive ones when necessary. No, not there yet. We only passed the first hurdle, with some more to come. We must look like legitimate users to avoid being tagged as a bot or scraper.
<h3><strong>User-Agent Header</strong></h3>
The next step would be to check our request headers. The most known one is <a class="attrlink" href="https://en.wikipedia.org/wiki/User_agent" target="_blank" rel="noopener noreferrer nofollow">User-Agent</a> (UA for short), but there are many more. UA follows a format we’ll see later, and many software tools, for example, GoogleBot, have their own.

Here is what the target website will receive if we use Python Requests or cURL directly.
<pre><code class="language-python">import requests 

 

response = requests.get('http://httpbin.org/headers') 

print(response.json()['headers']['User-Agent']) 

# python-requests/2.25.1

curl http://httpbin.org/headers # { ... "User-Agent": "curl/7.74.0" ... }</code></pre>
Many sites won’t check UA, but this is a huge red flag for the ones that do this. We’ll have to fake it. Luckily, most libraries allow custom headers. Following the example using Requests:
<pre><code class="language-python">import requests 

 

headers = {"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36"} 

response = requests.get('http://httpbin.org/headers', headers=headers) 

print(response.json()['headers']['User-Agent']) # Mozilla/5.0 ...</code></pre>
To get your current user agent, visit <a class="attrlink" href="https://httpbin.org/headers" target="_blank" rel="noopener noreferrer nofollow">httpbin</a> just as the code snippet is doing and copy it. <strong>Requesting all the URLs with the same UA might also trigger some alerts</strong>, making the solution a bit more complicated.

Ideally, we would have all the current possible User-Agents and rotate them as we did with the IPs. Since that is nearly impossible, we can at least have a few. There are <a class="attrlink" href="https://developers.whatismybrowser.com/useragents/explore/" target="_blank" rel="noopener noreferrer nofollow">lists of User-Agents</a> available for us to choose from.
<pre><code class="language-python">import requests 

import random 

 

user_agents = [ 

        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36', 

        'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36', 

        'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36', 

        'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148', 

        'Mozilla/5.0 (Linux; Android 11; SM-G960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Mobile Safari/537.36' 

] 

user_agent = random.choice(user_agents) 

headers = {'User-Agent': user_agent} 

response = requests.get('https://httpbin.org/headers', headers=headers) 

print(response.json()['headers']['User-Agent']) 

# Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) ...</code></pre>
Keep in mind that browsers change versions quite often, and this list can be obsolete in a few months. If we’re to use User-Agent rotation, a reliable source is essential. We can do it by hand or use a service provider.

We are a step closer, but there is still one flaw in the headers: anti-bot systems also know this trick and check other headers along with the User-Agent.
<h3><strong>Full Set of Headers</strong></h3>
<strong>Each browser, or even version, sends different headers</strong>. Check Chrome and Firefox in action:
<pre><code class="language-python">{ 

        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", 

        "Accept-Encoding": "gzip, deflate, br", 

        "Accept-Language": "en-US,en;q=0.9", 

        "Host": "httpbin.org", 

        "Sec-Ch-Ua": "\"Chromium\";v=\"92\", \" Not A;Brand\";v=\"99\", \"Google Chrome\";v=\"92\"", 

        "Sec-Ch-Ua-Mobile": "?0", 

        "Sec-Fetch-Dest": "document", 

        "Sec-Fetch-Mode": "navigate", 

        "Sec-Fetch-Site": "none", 

        "Sec-Fetch-User": "?1", 
        "Upgrade-Insecure-Requests": "1", 
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" 

}

{ 

        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", 
        "Accept-Encoding": "gzip, deflate, br", 
        "Accept-Language": "en-US,en;q=0.5", 
        "Host": "httpbin.org", 
        "Sec-Fetch-Dest": "document", 
        "Sec-Fetch-Mode": "navigate", 
        "Sec-Fetch-Site": "none", 
        "Sec-Fetch-User": "?1", 
        "Upgrade-Insecure-Requests": "1", 
        "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0" 
}</code></pre>
It means what you think it means. The previous array with five User-Agents is incomplete. We need an array with a complete set of headers per User-Agent. For brevity, we’ll show a list with one item. It’s already long enough.

In this case, copying the result from httpbin isn’t enough. The ideal would be to copy it directly from the source. The easiest way to do it’s from Firefox, Chrome DevTools, or your browser's equivalent.

Go to the Network tab, visit the target website, right-click on the request and “Copy as cURL”. Then <a class="attrlink" href="https://curl.trillworks.com/#python" target="_blank" rel="noopener noreferrer nofollow">convert the cURL syntax to Python</a> and paste the headers into the list.
<pre><code class="language-python">import requests 

import random 

 

headers_list = [{ 

        'authority': 'httpbin.org', 

        'cache-control': 'max-age=0', 

        'sec-ch-ua': '"Chromium";v="92", " Not A;Brand";v="99", "Google Chrome";v="92"', 

        'sec-ch-ua-mobile': '?0', 

        'upgrade-insecure-requests': '1', 

        'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36', 

        'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 

        'sec-fetch-site': 'none', 

        'sec-fetch-mode': 'navigate', 

        'sec-fetch-user': '?1', 

        'sec-fetch-dest': 'document', 

        'accept-language': 'en-US,en;q=0.9', 

} # , {...} 

] 

headers = random.choice(headers_list) 

response = requests.get('https://httpbin.org/headers', headers=headers) 

print(response.json()['headers'])</code></pre>
We could add a Referer header for extra security, such as Google or an internal page from the same website. It would mask the fact that we always request URLs directly without interaction.

But be careful since adding a referrer would change more headers. You don’t want your Python Request script blocked by mistakes like that.
<h3><strong>Cookies</strong></h3>
We ignored the <a class="attrlink" href="https://en.wikipedia.org/wiki/HTTP_cookie" target="_blank" rel="noopener noreferrer nofollow">cookies</a> above since they deserve a separate section. <strong>Cookies can help you bypass some anti-bots or get your requests blocked.</strong> They’re a powerful tool that we need to understand correctly.

For example, cookies can <strong>track a user session and remember that user after login</strong>. Websites assign each new user a cookie session. There are many ways to do it, but we’ll try to simplify. Then the user’s browser will send that cookie in each request, tracking the user’s activity.

How is that a problem? We use rotating proxies, so each request might have a different IP from different regions or countries. Anti-bots can see and block that pattern since it’s not a natural way for users to browse.

On the other hand, once you bypass the anti-bot solution, it’ll send valuable cookies. Defensive systems won’t check twice if the session looks legit. Check out <a class="attrlink" href="https://www.zenrows.com/blog/bypass-cloudflare?utm_source=medium.com&amp;utm_medium=social&amp;utm_campaign=republishing" target="_blank" rel="noopener noreferrer nofollow">how to bypass Cloudflare</a> for more information.

Will cookies help our Python Requests scripts to avoid bot detection? Or will they hurt us and get us blocked? The answer lies in our implementation.

For simple cases, not sending cookies might work best. There is no need to maintain a session.

For more advanced cases and anti-bot software, session cookies might be the only way to reach and scrape the final content. Always taking into account that the session requests and the IP must match.

The same happens if we want content generated in the browser after XHR calls. We’ll need to use a headless browser. After the initial load, the JavaScript will try to get some content using an XHR call. We can’t do that call without cookies on a protected site.

How will we use headless browsers, specifically Playwright, to avoid detection? Keep on reading!
<h3><strong>Headless Browsers</strong></h3>
Some anti-bot systems will only show the content after the browser solves a JavaScript challenge. And we can’t use Python Requests to simulate browser behavior like that. We need a browser with JavaScript execution to run and pass the challenge.

<a class="attrlink" href="https://www.selenium.dev/" target="_blank" rel="noopener noreferrer nofollow">Selenium</a>, <a class="attrlink" href="https://github.com/puppeteer/puppeteer" target="_blank" rel="noopener noreferrer nofollow">Puppeteer</a>, and Playwright are the most used and known libraries. Avoiding them for performance reasons would be preferable, and they’ll make scraping slower. But sometimes, there is no alternative.

We’ll see how to run Playwright. The snippet below shows a simple script visiting a page that prints the sent headers. The output only shows the User-Agent, but since it’s a real browser, the headers will include the entire set (Accept, Accept-Encoding, etc.).
<pre><code class="language-python">import json 

from playwright.sync_api import sync_playwright 

with sync_playwright() as p: 

        for browser_type in [p.chromium, p.firefox, p.webkit]: 

                browser = browser_type.launch() 
                page = browser.new_page() 
                page.goto('https://httpbin.org/headers') 
                jsonContent = json.loads(page.inner_text('pre')) 
                print(jsonContent['headers']['User-Agent']) 
                browser.close() 

# Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/93.0.4576.0 Safari/537.36 

# Mozilla/5.0 (X11; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0 

# Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Safari/605.1.15</code></pre>
This approach comes with its own problem: take a look at the User-Agents. The Chromium one includes <em>Headless Chrome</em>, which will tell the target website that it’s a headless browser. They might act upon that.

Back to the headers section: we can add custom headers that will overwrite the default ones. Replace the line in the previous snippet with this one and paste a valid User-Agent:

<a href="http://browser.new" target="_blank" rel="noopener noreferrer nofollow"><code>browser.new</code></a><code>_page(extra_http_headers={'User-Agent': '...'})</code>

That is just entry-level with headless browsers. Headless detection is a field in itself, and many people are working on it. Some to detect it, some to avoid being blocked. As an example, you can visit <a class="attrlink" href="https://pixelscan.net/" target="_blank" rel="noopener noreferrer nofollow">Pixelscan</a> with an actual browser and a headless one. To be deemed “consistent,” you’ll need to work hard.

Look at the screenshot below, taken when visiting Pixelscan with Playwright. See the UA? The one we fake is all right, but they can detect that we’re lying by checking the navigator JavaScript API.

<img src="https://miro.medium.com/v2/resize:fit:641/0*rxh_v8QlJVNVh3hB.jpg" align="left" />

We can pass user_agent, and Playwright will set the User-Agent in JavaScript and the header for us. Nice!

<code>page = </code><a href="http://browser.new" target="_blank" rel="noopener noreferrer nofollow"><code>browser.new</code></a><code>_page(user_agent='...')</code>

You can easily add <a class="attrlink" href="https://pypi.org/project/playwright-stealth/" target="_blank" rel="noopener noreferrer nofollow">Playwright stealth</a> to your scripts for more advanced cases, making detection harder. It handles inconsistencies between headers and browser JavaScript APIs, among other things.

In summary, having 100% coverage is complex, but you won’t need it most of the time. Sites can always do more complex checks: WebGL, touch events, or battery status.

You won’t need those extra features unless you are trying to scrape a website that requires <a class="attrlink" href="https://www.zenrows.com/blog/bypass-cloudflare?utm_source=medium.com&amp;utm_medium=social&amp;utm_campaign=republishing" target="_blank" rel="noopener noreferrer nofollow">bypassing an anti-bot solution, like Akamai</a>. And for those cases, that extra effort will be mandatory. And demanding, to be honest.
<h1><strong>Geographic Limits or Geo-Blocking</strong></h1>
Have you ever tried to watch CNN from outside the US?

<img src="https://miro.medium.com/v2/resize:fit:700/1*jKChZc8tXuxtEt8TDcR2Ew.png" align="left" />

That’s called <a class="attrlink" href="https://en.wikipedia.org/wiki/Geo-blocking" target="_blank" rel="noopener noreferrer nofollow">geo-blocking</a>. Only connections from inside the US can watch CNN live. We could bypass that using a <a class="attrlink" href="https://en.wikipedia.org/wiki/Virtual_private_network" target="_blank" rel="noopener noreferrer nofollow">Virtual Private Network (VPN)</a>. We can then browse as usual, but the website will see a local IP, thanks to the VPN.

The same can happen when scraping websites with geo-blocking. There is an equivalent for proxies: <strong>geolocated proxies</strong>. Some proxy providers allow us to choose from a list of countries. With that activated, we’ll only get local IPs from the US.
<h3><strong>Behavioral Patterns</strong></h3>
Blocking IPs and User-Agents isn’t enough these days. They become unmanageable and stale in hours if not minutes. We are mainly safe if we perform requests with clean IPs and real-world User-Agents.

There are more factors involved, but most requests should be valid.

However, most modern anti-bot software uses machine learning and behavioral patterns, not just static markers (IP, UA, geolocation). That means <strong>we would be detected if we always performed the same actions in the same order</strong>.
<ol>
 	<li>Go to the homepage.</li>
 	<li>Click on the “Shop” button.</li>
 	<li>Scroll down.</li>
 	<li>Go to page 2.</li>
</ol>
After a few days, launching the same script could result in every request being blocked. Many people can perform those same actions, but bots have something that makes them obvious: speed.

With software, we would execute every step sequentially, while an actual user would take a second, then click, scroll down slowly using the mouse wheel, move the mouse to the link, and click.

Maybe there is no need to fake all that, but be aware of the possible problems and know how to face them.

We have to think about what we want. Maybe we don’t need that first request since we only require the second page. We could use that as an entry point, not the homepage.

And save one request. It can scale to hundreds of URLs per domain. No need to visit every page in order; scroll down, click on the next page, and start again.

To scrape search results, once we recognize the URL pattern for pagination, we only need two data points: the number of items and items per page. And most of the time, that info is present on the first page or request.
<pre><code class="language-python">import requests 
from bs4 import BeautifulSoup 

response = requests.get('https://scrapeme.live/shop/') 
soup = BeautifulSoup(response.content, 'html.parser') 
pages = soup.select('.woocommerce-pagination a.page-numbers:not(.next)') 
print(pages[0].get('href')) # https://scrapeme.live/shop/page/2/ 
print(pages[-1].get('href')) # https://scrapeme.live/shop/page/48/</code></pre>
One request shows us that there are 48 pages. We can now queue them. Mixing with the other techniques, we would scrape the content from this page and add the remaining 47. To scrape them by bypassing anti-bot systems, we could:
<ul>
 	<li>Shuffle the page order to avoid pattern detection.</li>
 	<li>Use different IPs and User-Agents, so each request looks new.</li>
 	<li>Add delays between some of the calls.</li>
 	<li>Use Google as a referrer randomly.</li>
</ul>
We could write some snippets mixing all these, but the best option in real life is to use a tool with it all, like <a class="attrlink" href="https://docs.scrapy.org/en/latest/" target="_blank" rel="noopener noreferrer nofollow">Scrapy</a>, <a class="attrlink" href="http://docs.pyspider.org/en/latest/" target="_blank" rel="noopener noreferrer nofollow">pyspider</a>, <a class="attrlink" href="https://github.com/bda-research/node-crawler" target="_blank" rel="noopener noreferrer nofollow">node-crawler</a> (Node.js), or <a class="attrlink" href="https://github.com/gocolly/colly" target="_blank" rel="noopener noreferrer nofollow">Colly</a> (Go).

The idea being the snippets is to understand each problem on its own. But handling everything independently would be too complicated for large-scale, real-life projects.
<h3><strong>CAPTCHA</strong></h3>
Even the best-prepared request can get caught and shown a <a class="attrlink" href="https://en.wikipedia.org/wiki/CAPTCHA" target="_blank" rel="noopener noreferrer nofollow">CAPTCHA</a>. Nowadays, <strong>solving CAPTCHAS is achievable</strong> with solutions like Anti Captcha and 2Captcha but a waste of time and money. <strong>The best solution is to avoid them.</strong> The second best is to forget about that request and retry.

The exception is obvious: sites that always show a CAPTCHA on the first visit. We have to solve it if there is no way to bypass it.

And then, <strong>use the session cookies to avoid being challenged again</strong>.

It might sound counterintuitive, but waiting for a second and retrying the same request with a different IP and set of headers will be faster than solving a CAPTCHA. Try it yourself and tell us about the experience.
<h3><strong>Be a Good Internet Citizen</strong></h3>
We can use several websites for testing, but be careful when doing the same at scale. Try to be a good internet citizen and don’t cause DDoS. Limit your interactions per domain. Amazon can handle thousands of requests per second, but not all target sites will.

We’re always talking about “read-only” browsing mode. Access a page and read its contents. Never submit a form or perform active actions with malicious intent.

If we take a more active approach, several other factors would matter: writing speed, mouse movement, navigation without clicking, browsing many pages simultaneously, etc. Bot prevention software is specifically aggressive with active actions. As it should for security reasons.

We won’t discuss this part, but these actions will give them new reasons to block requests. Again, good citizens don’t try massive logins. We’re talking about scraping, not malicious activities.

Sometimes websites make data collection harder, maybe not on purpose. But with modern frontend tools, CSS classes could change daily, ruining thoroughly prepared scripts. For more details, read our previous entry on <a class="attrlink" href="https://www.zenrows.com/blog/mastering-web-scraping-in-python-from-zero-to-hero?utm_source=medium.com&amp;utm_medium=social&amp;utm_campaign=republishing" target="_blank" rel="noopener noreferrer nofollow">how to scrape data in Python</a>.
<h3><strong>Conclusion</strong></h3>
We’d like you to remember the low-hanging fruits:
<ol>
 	<li>IP rotating proxies.</li>
 	<li>Residential proxies for challenging targets.</li>
 	<li>Full set headers, including User-Agent.</li>
 	<li>Bypass bot detection with Playwright when JavaScript challenge is required, maybe adding the stealth module.</li>
 	<li>Avoid patterns that might tag you as a bot. There are many more, and probably more we didn’t cover. But with these techniques, you should be able to crawl and scrape at scale. After all, web scraping without getting blocked with Python is possible if you know how.</li>
</ol>
If you find this post exciting, find more exciting posts on <a class="attrlink" href="http://blog.learnhub.africa/" target="_blank" rel="noopener noreferrer nofollow">Learnhub Blog</a>; we write everything tech from <a class="attrlink" href="https://blog.learnhub.africa/category/cloud-computing/" target="_blank" rel="noopener noreferrer nofollow">Cloud computing</a> to <a class="attrlink" href="https://blog.learnhub.africa/category/frontend/" target="_blank" rel="noopener noreferrer nofollow">Frontend Dev</a>, <a class="attrlink" href="https://blog.learnhub.africa/category/security/" target="_blank" rel="noopener noreferrer nofollow">Cybersecurity</a>, <a class="attrlink" href="https://blog.learnhub.africa/category/data-science/" target="_blank" rel="noopener noreferrer nofollow">AI</a>, and <a class="attrlink" href="https://blog.learnhub.africa/category/blockchain/" target="_blank" rel="noopener noreferrer nofollow">Blockchain</a>.

This was written by <a class="attrlink" href="https://medium.com/@zenrows?source=post_page-----69bf688aba9a--------------------------------" target="_blank" rel="noopener noreferrer nofollow">ZenRows</a> and Edited by <a class="attrlink" href="http://blog.learnhub.africa/" target="_blank" rel="noopener noreferrer nofollow">Leaernhub Blog</a>.
<h3>Resources</h3>
<ul>
 	<li><a class="attrlink" href="https://blog.learnhub.africa/2023/05/26/20-essential-python-extensions-for-visual-studio-code/" target="_blank" rel="noopener noreferrer nofollow">20 Essential Python Extensions for Visual Studio Code</a></li>
 	<li><a class="attrlink" href="https://blog.learnhub.africa/2023/04/27/using-python-for-web-scraping-and-data-extraction/" target="_blank" rel="noopener noreferrer nofollow">Using Python for Web Scraping and Data Extraction</a></li>
 	<li><a class="attrlink" href="https://blog.learnhub.africa/2023/06/06/13-powerful-python-snippets-to-automate-tasks/" target="_blank" rel="noopener noreferrer nofollow">13 Powerful Python Snippets To Automate Tasks</a></li>
 	<li><a class="attrlink" href="https://www.python.org/about/gettingstarted/" target="_blank" rel="noopener noreferrer nofollow">Getting Started with Python</a></li>
</ul>