<?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"><channel><title><![CDATA[SKILLMERC]]></title><description><![CDATA[SKILLMERC]]></description><link>https://skillmerc.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6b0fe1cc93c34d71223aabf5/94f7e6d4-fb60-49d1-9e9b-a0bf69f32b13.png</url><title>SKILLMERC</title><link>https://skillmerc.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 22:29:36 GMT</lastBuildDate><atom:link href="https://skillmerc.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to turn your ChatGPT data export into Markdown files (Python, no packages)]]></title><description><![CDATA[Disclosure: this guide comes from SKILLMERC, which makes Threadkeep, a browser add-on named in the last section. Everything before that section uses only…]]></description><link>https://skillmerc.hashnode.dev/how-to-turn-your-chatgpt-data-export-into-markdown-files-python-no-packages</link><guid isPermaLink="true">https://skillmerc.hashnode.dev/how-to-turn-your-chatgpt-data-export-into-markdown-files-python-no-packages</guid><category><![CDATA[Python]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[markdown]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[SKILLMERC]]></dc:creator><pubDate>Fri, 04 Dec 2026 09:52:56 GMT</pubDate><content:encoded><![CDATA[<p><em>Disclosure: this guide comes from SKILLMERC, which makes Threadkeep, a browser add-on named in the last section. Everything before that section uses only ChatGPT and Python.</em></p>
<p>ChatGPT's own "Export data" gives you every conversation still in your account, but not in a form you can drop into a notes app, a Git repo or a search tool. You get a ZIP with a viewer page and JSON. This guide turns that JSON into one clean Markdown file per conversation with a short Python script that needs no packages.</p>
<h2>Step 1: Request the export</h2>
<p>On chatgpt.com, by OpenAI's <a href="https://help.openai.com/en/articles/7260999-exporting-your-chatgpt-history-and-data">help page on exporting your data</a>:</p>
<ol>
<li>Open your profile menu and click <strong>Settings</strong>, then <strong>Data controls</strong>.</li>
<li>Under <strong>Export data</strong>, click <strong>Export</strong>, then <strong>Confirm export</strong>.</li>
<li>Wait for the email or text with the <strong>Download data export</strong> link, and open it while signed in to the same ChatGPT account. OpenAI says it can take up to 7 days, and the link expires 24 hours after you get it, so download it the day it arrives.</li>
</ol>
<p>The export is not available in ChatGPT Business, Enterprise or ChatGPT for Healthcare workspaces.</p>
<p>Unzip it. The files that matter here are <code>conversations.json</code>, or several files named <code>conversations-000.json</code>, <code>conversations-001.json</code> and so on in larger exports. The viewer page, <code>index.html</code>, lets you read and search your chats in a browser. Earlier exports have a <code>chat.html</code> page instead.</p>
<h2>Step 2: Understand why the JSON looks strange</h2>
<p>OpenAI does not publish a schema for this file, but its shape has been stable enough that many tools rely on it. The file is a list of conversations. Each conversation has a <code>title</code>, a <code>create_time</code> (Unix seconds) and a <code>mapping</code>.</p>
<p>The <code>mapping</code> is a tree, not a list. Every time you edit a prompt or regenerate an answer, ChatGPT keeps the old version as a separate branch. If you read the nodes top to bottom you get abandoned drafts mixed into the chat, which is why naive converters show answers twice.</p>
<p>A trimmed conversation:</p>
<pre><code class="language-json">{
  "title": "Sort dicts",
  "create_time": 1764000000.5,
  "current_node": "a2",
  "mapping": {
    "u1": {"message": {"author": {"role": "user"},
            "content": {"parts": ["How do I sort a list of dicts by key?"]}},
           "parent": "root", "children": ["a1", "a2"]},
    "a1": {"message": {"author": {"role": "assistant"},
            "content": {"parts": ["(the answer you regenerated)"]}},
           "parent": "u1", "children": []},
    "a2": {"message": {"author": {"role": "assistant"},
            "content": {"parts": ["Use sorted(items, key=lambda d: d['name'])."]}},
           "parent": "u1", "children": []}
  }
}
</code></pre>
<p>The trick: <code>current_node</code> points at the last message of the branch you last saw. Start there, follow <code>parent</code> up to the root, then reverse. That gives you the conversation as it looked on screen.</p>
<p>Three more things to skip:</p>
<ul>
<li><strong>System and tool messages.</strong> Keep only the <code>user</code> and <code>assistant</code> roles.</li>
<li><strong>Hidden messages.</strong> Some messages carry <code>"is_visually_hidden_from_conversation": true</code> in their <code>metadata</code>, such as custom instructions sent to the model.</li>
<li><strong>Non-text parts.</strong> Images and other attachments sit in <code>parts</code> as objects, not strings. Keep the strings.</li>
</ul>
<h2>Step 3: The script</h2>
<p>Save this as <code>chatgpt_to_md.py</code> next to your unzipped export folder. It needs Python 3 and nothing else.</p>
<pre><code class="language-python">import glob, json, re, sys
from datetime import datetime, timezone
from pathlib import Path

src = Path(sys.argv[1] if len(sys.argv) &gt; 1 else ".")
out = Path(sys.argv[2] if len(sys.argv) &gt; 2 else "chats")
out.mkdir(exist_ok=True)

files = sorted(glob.glob(str(src / "conversations*.json"))) if src.is_dir() else [str(src)]
used = set()

def text_of(msg):
    parts = (msg.get("content") or {}).get("parts") or []
    return "\n\n".join(p for p in parts if isinstance(p, str)).strip()

for path in files:
    data = json.loads(Path(path).read_text(encoding="utf-8"))
    for conv in data if isinstance(data, list) else [data]:
        mapping = conv.get("mapping") or {}
        chain, node_id = [], conv.get("current_node")
        while node_id and node_id in mapping:
            chain.append(mapping[node_id])
            node_id = mapping[node_id].get("parent")
        title = conv.get("title") or "Untitled"
        ts = conv.get("create_time")
        day = datetime.fromtimestamp(ts, timezone.utc).strftime("%Y-%m-%d") if ts else "undated"
        lines = [f"# {title}", "", f"Started: {day}", ""]
        for node in reversed(chain):
            msg = node.get("message") or {}
            role = (msg.get("author") or {}).get("role")
            hidden = (msg.get("metadata") or {}).get("is_visually_hidden_from_conversation")
            body = text_of(msg)
            if role in ("user", "assistant") and body and not hidden:
                lines += [f"## {'You' if role == 'user' else 'ChatGPT'}", "", body, ""]
        name = " ".join(re.sub(r'[\\/:*?"&lt;&gt;|]', " ", title).split())[:80] or "Untitled"
        stem, n = f"{day} {name}", 1
        while stem.lower() in used:
            n += 1
            stem = f"{day} {name} ({n})"
        used.add(stem.lower())
        (out / f"{stem}.md").write_text("\n".join(lines), encoding="utf-8")

print(f"Wrote {len(used)} files to {out}/")
</code></pre>
<p>Run it on the folder (it picks up every <code>conversations*.json</code> file) or on one file:</p>
<pre><code class="language-bash">python3 chatgpt_to_md.py ./chatgpt-export ./chats
</code></pre>
<p>You get one file per conversation, named by start date and title, such as <code>2025-11-24 Sort dicts.md</code>. Two chats with the same title on the same day get <code>(2)</code> added. Characters that are not allowed in file names become spaces.</p>
<p>Each file looks like this:</p>
<pre><code class="language-markdown"># Sort dicts

Started: 2025-11-24

## You

How do I sort a list of dicts by key?

## ChatGPT

Use sorted(items, key=lambda d: d['name']).
</code></pre>
<h2>Step 4: Check the output</h2>
<p>Before you delete the ZIP, open three or four files, including your longest chat:</p>
<ul>
<li>If it says "Wrote 0 files", look in the unzipped folder for more ZIP files and unzip those too. Some exports pack the conversation files one level deeper.</li>
<li>If a file has only its title and date, that chat held only pictures, files or tool output. The script keeps text only.</li>
<li>If a reply looks cut short, check the chat on chatgpt.com. Content types other than plain text (code runs, web search results, reasoning summaries) can store text outside <code>parts</code>, and this script leaves them out.</li>
<li>If your export has no <code>current_node</code>, the format has changed. Print one conversation with <code>json.dumps(data[0], indent=2)[:3000]</code> and adjust the walk.</li>
</ul>
<h2>Step 5: PDF or Word, if you need them</h2>
<p>Markdown converts well. With <a href="https://pandoc.org/">pandoc</a> installed:</p>
<pre><code class="language-bash">pandoc "chats/2025-11-24 Sort dicts.md" -o "Sort dicts.docx"
</code></pre>
<p>Open the .docx in Word and use <strong>Save As &gt; PDF</strong> for a PDF. Pandoc can write PDF directly too, but that needs a LaTeX engine installed.</p>
<h2>When the export is the wrong tool</h2>
<p>The data export is a backup of everything, and it can take days to arrive. If you want one conversation you have open right now as a file, there are quicker ways: your browser's print window (Ctrl+P or Cmd+P, then "Save to PDF" in Firefox or "Save as PDF" in Chrome), which prints the page with ChatGPT's side bar and buttons around the chat; or copy and paste into a document, which is fine for one answer.</p>
<p>Or an add-on. <a href="https://skillmerc.com/threadkeep/?utm_source=hashnode&amp;utm_medium=guide&amp;utm_campaign=chatgpt-export-markdown">Threadkeep</a> is a free add-on for Firefox and Chrome that we make. On the chat you have open, it saves Markdown, text or JSON files, or copies the chat to your clipboard, with no limit, and PDF or Word 3 times a day on the free plan (Pro, which is paid, removes that limit). It saves the chat as you see it on screen, keeps code blocks, tables and lists, and reads everything in your browser with no account. It works on ChatGPT, Claude, Gemini and other chat sites. It is made by SKILLMERC and is not made by, endorsed by or affiliated with OpenAI. ChatGPT is a trademark of OpenAI.</p>
<p>Whichever way you choose, the export plus the script above is the one route that gets every conversation out in one go, as plain files you own.</p>
]]></content:encoded></item><item><title><![CDATA[How to set up WooCommerce shipping zones for South Africa (flat rates, free shipping, courier rates and lockers)]]></title><description><![CDATA[Disclosure: this guide comes from SKILLMERC, which makes a free WordPress.org plugin for The Courier Guy, Pudo, Fastway and PAXI rates, named in step 5…]]></description><link>https://skillmerc.hashnode.dev/how-to-set-up-woocommerce-shipping-zones-for-south-africa-flat-rates-free-shipping-courier-rates-and-lockers</link><guid isPermaLink="true">https://skillmerc.hashnode.dev/how-to-set-up-woocommerce-shipping-zones-for-south-africa-flat-rates-free-shipping-courier-rates-and-lockers</guid><category><![CDATA[woocommerce]]></category><category><![CDATA[WordPress]]></category><category><![CDATA[ecommerce]]></category><category><![CDATA[PHP]]></category><dc:creator><![CDATA[SKILLMERC]]></dc:creator><pubDate>Thu, 03 Dec 2026 11:48:26 GMT</pubDate><content:encoded><![CDATA[<p><em>Disclosure: this guide comes from SKILLMERC, which makes a free WordPress.org plugin for The Courier Guy, Pudo, Fastway and PAXI rates, named in step 5. Steps 1 to 4 use only what WooCommerce ships with.</em></p>
<p>WooCommerce shipping zones decide which shipping options a customer in South Africa sees at checkout. Set them up well and a shopper in Sandton sees same-day delivery, a shopper in Polokwane sees a courier rate and a locker, and nobody sees "No shipping options were found". Set them up badly and some customers cannot check out at all.</p>
<p>This guide builds a working setup for a South African store from zero: the zones, flat rates, free shipping over an amount, collection, live courier rates, lockers and PEP store pickup, and how to test it before customers find the gaps.</p>
<h2>How WooCommerce picks a zone</h2>
<p>Three rules, from WooCommerce's own documentation, explain almost every shipping problem:</p>
<ol>
<li>Each customer matches <strong>one</strong> zone only, by their shipping address.</li>
<li>WooCommerce checks zones <strong>from the top of the list down</strong> and uses the first match.</li>
<li>A customer who matches a zone with no shipping methods is told no shipping option is available.</li>
</ol>
<p>So order matters. Put the smallest area first (a set of postcodes), then provinces, then the whole country. WooCommerce 11.1 and later shows a warning under a zone that can never match because a broader zone above it covers the same region.</p>
<h2>Step 1: Check where you ship</h2>
<p>Go to <strong>WooCommerce &gt; Settings &gt; General</strong> and check <strong>Shipping location(s)</strong>. If you only ship inside South Africa, choose to ship to specific countries and pick South Africa. Everything below assumes that.</p>
<h2>Step 2: Plan the zones</h2>
<p>A plan that suits most South African stores:</p>
<table>
<thead>
<tr>
<th>Order</th>
<th>Zone name</th>
<th>Regions</th>
<th>Methods</th>
</tr>
</thead>
<tbody><tr>
<td>1</td>
<td>Local delivery</td>
<td>South Africa, limited to your own postcodes</td>
<td>Own delivery (flat rate), collection</td>
</tr>
<tr>
<td>2</td>
<td>Main centres</td>
<td>Gauteng, Western Cape, KwaZulu-Natal</td>
<td>Courier (flat or live), locker or PEP pickup, free over an amount</td>
</tr>
<tr>
<td>3</td>
<td>Rest of South Africa</td>
<td>South Africa</td>
<td>Courier (flat or live), locker or PEP pickup</td>
</tr>
</tbody></table>
<p>Zone 3 catches every South African address that zones 1 and 2 missed, so nobody in the country ends up in a zone with no methods. WooCommerce's built-in <strong>Rest of the world</strong> zone (it cannot be moved or deleted) covers everyone else: leave it with no methods if you do not ship abroad.</p>
<p>You can skip zone 2 if you charge the same everywhere. Many stores do, and one South Africa zone is the simplest setup that works.</p>
<h2>Step 3: Create the zones</h2>
<p>For each zone in your plan:</p>
<ol>
<li>Go to <strong>WooCommerce &gt; Settings &gt; Shipping &gt; Shipping zones</strong> and click <strong>Add zone</strong>.</li>
<li>Enter the zone name.</li>
<li>In <strong>Zone regions</strong>, start typing a province (for example Gauteng) or the country and pick it from the list. Regions can be countries, provinces or continents.</li>
<li>For the local zone only, click <strong>Limit to specific ZIP/postcodes</strong> and enter one rule per line. A rule can be one postcode (<code>2196</code>), a numeric range (<code>2190...2199</code>) or a prefix with a wildcard (<code>21*</code>). Wildcards inside a range (<code>21*...22*</code>) are not supported.</li>
<li>Add the shipping methods (step 4 and step 5), then click <strong>Save changes</strong>.</li>
</ol>
<p>Then drag the zones into the order of the table above, smallest first.</p>
<p>Look up your own postcodes before you type them. South African postcodes do not map neatly onto suburbs, and one wrong prefix sends a far-away customer your local delivery price.</p>
<h2>Step 4: Add the built-in methods</h2>
<p>WooCommerce comes with three methods: flat rate, free shipping and local pickup. Open a zone, click <strong>Add shipping method</strong>, pick one and click <strong>Continue</strong>.</p>
<p><strong>Flat rate.</strong> Give it a name customers will understand (for example "Courier, 2 to 4 working days") and a cost. The cost field accepts simple formulas:</p>
<ul>
<li><code>[qty]</code> is the number of items in the cart.</li>
<li><code>[weight]</code> is the total weight of the items, in your store's weight unit. Items without a weight count as zero.</li>
<li><code>[fee percent="10" min_fee="60"]</code> is a percentage of the cart. <code>min_fee</code> and <code>max_fee</code> are both optional.</li>
</ul>
<p>Examples, in rand:</p>
<pre><code class="language-text">99                                  same price for every order
85 + ( 15 * [qty] )                 R85, plus R15 for each item
70 + ( 12 * [weight] )              R70, plus R12 a kilogram (store weight unit: kg)
[fee percent="8" min_fee="80" max_fee="250"]   8% of the cart, at least R80, at most R250
</code></pre>
<p>If you use a weight formula, give every product a weight first. A product with no weight adds nothing, and an order of weightless products can ship for the base price only.</p>
<p><strong>Free shipping.</strong> Add it next to the flat rate, set <strong>Free shipping requires</strong> to <strong>A minimum order amount</strong> and enter the amount (for example R750). Below that amount it does not show; from that amount up, the customer can pick it. A checkbox sets whether the amount is checked before or after coupon discounts.</p>
<p><strong>Local pickup.</strong> For customers who collect from your shop or warehouse. On the Checkout block (the default on new stores), turn it on under <strong>WooCommerce &gt; Settings &gt; Shipping &gt; Local pickup</strong> and add at least one pickup location. That pickup is not tied to a zone, so every customer sees it, wherever they are. To offer collection only in the local zone, add the zone's own <strong>Local pickup</strong> method there instead. Do not turn on both: two pickup options confuse customers, and WooCommerce shows a notice when both are on.</p>
<p>The first enabled method in a zone is selected by default at checkout, so drag the one you want most customers to take to the top.</p>
<h2>Step 5: Live courier rates, lockers and PEP store pickup</h2>
<p>A flat rate is a guess. A live rate asks the courier for the real price of this cart to this address. For South African stores the common options are:</p>
<ul>
<li><strong>The Courier Guy.</strong> Its own WooCommerce plugin is on WordPress.org. The Courier Guy told us by email that it is moving away from its own plugins and wants stores to move to a new platform, TCG Connect. On 26 November 2026 it told us its current plugins are scheduled to be discontinued by the end of 2026, and on 30 November 2026 that its API stays available and unchanged, so merchants can keep using their own API keys. The details and sources are in <a href="https://skillmerc.com/sa-shipping-woocommerce/help/courier-guy-woocommerce-plugin-retired/?utm_source=hashnode&amp;utm_campaign=woocommerce-shipping-zones-sa">our write-up of the change</a>.</li>
<li><strong>Pudo lockers.</strong> The customer picks a locker at checkout and the courier delivers to it. The Courier Guy renamed Pudo to Lockers (The Courier Guy Locker) in 2025.</li>
<li><strong>PAXI.</strong> Collection at PEP stores, with a map where the customer picks a PAXI point. PAXI has no public rates API, so its prices are fixed amounts you set from PAXI's current price list.</li>
<li><strong>Fastway.</strong> Live rates from Fastway Couriers South Africa through a free Fastway API key.</li>
</ul>
<p>Live rates and a locker or PEP point picker need a plugin, which adds its methods to the zones from step 3 the same way as a flat rate. Without one, a flat rate named after the service (for example "Courier to your door") works with steps 1 to 4, at a fixed price you set from the courier's price list.</p>
<p>One free option that covers all four is our plugin, <a href="https://wordpress.org/plugins/skillmerc-shipping-courier-guy-pudo-paxi/">SKILLMERC Shipping for The Courier Guy, Pudo and PAXI</a>. Install it, open your South Africa zone, add "The Courier Guy (door to door)", choose Live, paste the API key from your The Courier Guy portal (Settings, API keys) and fill in your sender address. It also adds a Pudo locker picker, Fastway rates and PAXI points, and a fallback flat rate that shows if the courier's rates call fails, so a rates outage does not leave customers with no shipping method. The free plugin quotes rates; it does not book collections or print waybills, so you book shipments in your courier account as usual. It is not made by or affiliated with The Courier Guy.</p>
<p>Whichever plugin you use, do not run two of them for the same courier in one zone: customers will see two sets of rates. Remove or switch off the old method first, and test on a staging copy of your store if you can.</p>
<h2>Step 6: Test before customers do</h2>
<ol>
<li>Open your store in a private window, add a product to the cart, and use <strong>Calculate shipping</strong> on the cart page.</li>
<li>Try one address for each zone: one of your local postcodes, a city in a main-centre province, and a town elsewhere in the country.</li>
<li>Check the method names, prices and free-shipping threshold for each.</li>
<li>Go through to checkout once on the Checkout block, since that is what most new stores use.</li>
</ol>
<h2>When customers see "No shipping options were found"</h2>
<p>Work down this list:</p>
<ul>
<li><strong>No zone matches the address,</strong> or the matching zone has no methods. Zone 3 in the plan above exists to stop this.</li>
<li><strong>A broad zone sits above a narrow one.</strong> Drag the narrow one higher. WooCommerce 11.1 and later warns you under the zone.</li>
<li><strong>A postcode rule is wrong,</strong> for example a range written with wildcards. Use a plain range or a wildcard prefix, not both.</li>
<li><strong>A live-rate method got no answer</strong> from the courier (wrong key, sandbox key on a live store, missing product size or weight, or an outage), and no other method is enabled in that zone. Keep a flat rate or a fallback rate enabled next to any live-rate method.</li>
<li><strong>Shipping location(s)</strong> in step 1 does not include South Africa.</li>
</ul>
<p>That is the whole setup. Start with one South Africa zone and one flat rate, check it works, and add local delivery, free shipping and live courier rates one at a time.</p>
<p>Made by SKILLMERC.</p>
]]></content:encoded></item><item><title><![CDATA[How to export an HTML table to CSV (and keep the minus signs)]]></title><description><![CDATA[Disclosure: this guide comes from SKILLMERC, which makes List & Table Scraper, one of the browser extensions named in the last method. Every method before…]]></description><link>https://skillmerc.hashnode.dev/how-to-export-an-html-table-to-csv-and-keep-the-minus-signs</link><guid isPermaLink="true">https://skillmerc.hashnode.dev/how-to-export-an-html-table-to-csv-and-keep-the-minus-signs</guid><category><![CDATA[Python]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[csv]]></category><category><![CDATA[web scraping]]></category><dc:creator><![CDATA[SKILLMERC]]></dc:creator><pubDate>Wed, 02 Dec 2026 16:17:55 GMT</pubDate><content:encoded><![CDATA[<p><em>Disclosure: this guide comes from SKILLMERC, which makes List &amp; Table Scraper, one of the browser extensions named in the last method. Every method before that works without it.</em></p>
<p>You found an HTML table on a web page and you want it as a CSV file. There are several good ways to do it, from plain copy and paste to a Python script you can run every week. This guide runs each one on the same real page, then covers the three things that quietly break the data whichever method you use.</p>
<p>The example is Wikipedia's list of the busiest airports by passenger traffic:</p>
<pre><code class="language-plaintext">https://en.wikipedia.org/wiki/List_of_busiest_airports_by_passenger_traffic
</code></pre>
<p>The page has one table per year. The first is the newest year (2025 when we checked on 2 December 2026): 50 airports in eight columns, Rank, Airport, Location, Country, Code (IATA/ICAO), Total passengers, Rank change and % change.</p>
<h2>Which method to pick</h2>
<table>
<thead>
<tr>
<th>You want</th>
<th>Use</th>
</tr>
</thead>
<tbody><tr>
<td>One table, once, no tools</td>
<td>1. Copy and paste</td>
</tr>
<tr>
<td>A sheet that refetches the page by itself</td>
<td>2. IMPORTHTML in Google Sheets, or From Web in Excel</td>
</tr>
<tr>
<td>A clean CSV now, from any page you can open, nothing to install</td>
<td>3. A console snippet</td>
</tr>
<tr>
<td>The same table every week from a script</td>
<td>4. Python and pandas</td>
</tr>
<tr>
<td>Tables, or lists that are not tables, across several pages, in a few clicks</td>
<td>5. A browser extension</td>
</tr>
</tbody></table>
<h2>1. Copy and paste into a spreadsheet</h2>
<ol>
<li>Select the table on the page, from the first header cell to the last cell, and copy it.</li>
<li>Paste it into a blank Google Sheet or Excel sheet. For a normal HTML table, each cell lands in its own cell.</li>
<li>Save it as CSV. In Google Sheets: File &gt; Download &gt; Comma-separated values (.csv). In Excel: File &gt; Save As, then pick "CSV UTF-8 (Comma delimited)".</li>
</ol>
<p>This is fine for one table. Footnote markers such as <code>[4]</code> come along inside your cells, so look at the result before you use it, and check any column that shows arrows or icons (see "Three things that quietly break the data" below).</p>
<h2>2. Let the spreadsheet fetch the page</h2>
<p>In Google Sheets, one formula pulls the table in:</p>
<pre><code class="language-plaintext">=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_busiest_airports_by_passenger_traffic", "table", 1)
</code></pre>
<p>The last number is the table's position in the page's HTML source, counting from 1. If a yellow bar says some formulas are trying to send and receive data from external parties, click "Allow access". On this page the formula brings back the 2025 table with all three problems described below: Atlanta's total arrives as the text "106,302,208[4]", Dubai's as "095,192,160[4]", and Atlanta's 1.6% fall shows as 1.60% with no minus sign. Clean those columns, then use File &gt; Download &gt; Comma-separated values (.csv). We wrote a full walk-through of IMPORTHTML, including what to do when it comes back empty: <a href="https://dev.to/skillmerc/how-to-use-importhtml-in-google-sheets-and-what-to-do-when-it-comes-back-empty-245i">How to use IMPORTHTML in Google Sheets</a>.</p>
<p>In Excel for Microsoft 365 on Windows, go to the Data tab, click From Web, paste the address and click OK, then pick the table in the Navigator pane and click Load. Microsoft's guide: <a href="https://support.microsoft.com/en-us/excel/get-started/import-data-from-the-web">Import data from the web</a>. Then save as "CSV UTF-8 (Comma delimited)".</p>
<p>Both fetch the page themselves instead of reading your browser tab, so a page you only see after signing in will not come through.</p>
<h2>3. A console snippet that downloads a real CSV</h2>
<p>This works on any page you can open, including pages behind a sign-in, because it reads the table you are looking at.</p>
<ol>
<li>Open the page.</li>
<li>Open the browser console: F12, then the Console tab. On a Mac, press Cmd+Option+J in Chrome or Cmd+Option+K in Firefox.</li>
<li>Paste the snippet below and press Enter. Chrome and Firefox may ask you to type "allow pasting" first. Only paste code you have read.</li>
</ol>
<pre><code class="language-js">(() =&gt; {
  // Pick the table: the first Wikipedia data table that contains this text.
  const table = [...document.querySelectorAll("table.wikitable")]
    .find(t =&gt; t.innerText.includes("Total"));

  const cellText = cell =&gt; {
    let text = "";
    const walk = document.createTreeWalker(cell, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT);
    while (walk.nextNode()) {
      const node = walk.currentNode;
      if (node.nodeName === "BR") { text += " "; continue; }
      if (node.nodeName === "IMG" &amp;&amp; node.alt === "Decrease") { text += "-"; continue; }
      if (node.nodeType !== Node.TEXT_NODE) continue;
      const el = node.parentElement;
      if (el.closest("sup.reference")) continue;                  // footnote markers
      if (getComputedStyle(el).visibility !== "visible") continue; // hidden padding
      if (el.getClientRects().length === 0) continue;               // display: none
      text += node.nodeValue;
    }
    return text.replace(/\s+/g, " ").trim();
  };

  const quote = v =&gt; /[",\r\n]/.test(v) ? '"' + v.replace(/"/g, '""') + '"' : v;

  const csv = [...table.rows]
    .map(row =&gt; [...row.cells].map(cellText).map(quote).join(","))
    .join("\r\n");

  // The \uFEFF marker at the start makes Excel read the file as UTF-8.
  const blob = new Blob(["\uFEFF" + csv], { type: "text/csv;charset=utf-8" });
  const link = document.createElement("a");
  link.href = URL.createObjectURL(blob);
  link.download = "table.csv";
  link.click();
  return table.rows.length + " rows saved";
})();
</code></pre>
<p>On the airports page this gives 51 lines, the header and 50 airports. The first rows:</p>
<pre><code class="language-plaintext">Rank,Airport,Location,Country,Code (IATA/ICAO),Total passengers,Rank change,% change
1.,Hartsfield–Jackson Atlanta International Airport,"Atlanta, Georgia",United States,ATL/KATL,"106,302,208",,-1.6%
2.,Dubai International Airport,"Garhoud, Dubai, Dubai",United Arab Emirates,DXB/OMDB,"95,192,160",,3.1%
3.,Tokyo Haneda Airport,"Ōta, Tokyo",Japan,HND/RJTT,"91,679,814",1,6.7%
4.,Dallas Fort Worth International Airport,"Dallas–Fort Worth, Texas",United States,DFW/KDFW,"85,660,127",-1,-2.5%
</code></pre>
<p>To use it on another page, change <code>"Total"</code> to a word that only appears in the table you want. <code>table.wikitable</code> is Wikipedia's class for data tables, which keeps infoboxes and navigation boxes out; on other sites use the table's own class, or plain <code>table</code>. The two lines marked "footnote markers" and "Decrease" are written for Wikipedia; on other sites, look at how the page marks footnotes and arrows (right-click, Inspect) and change those selectors.</p>
<h2>4. Python and pandas</h2>
<p>pandas reads every <code>&lt;table&gt;</code> in a page into a DataFrame, and <code>to_csv</code> writes it out. Install it with:</p>
<pre><code class="language-plaintext">pip install pandas lxml
</code></pre>
<p>The one-liner most guides show is <code>pd.read_html(url)</code>. On Wikipedia it fails with <code>HTTP Error 403: Forbidden</code> (we got that on 2 December 2026), because Wikipedia turns away requests that carry Python's default User-Agent or none at all. And even with the HTML in hand, a plain <code>read_html</code> gives you cells like these from the raw page:</p>
<pre><code class="language-plaintext">095,192,160[4]
01.6%
</code></pre>
<p>That is a hidden padding zero, a footnote marker, and a percentage that should be negative. Here is a script that fixes all three before pandas parses the page:</p>
<pre><code class="language-python">import io
import urllib.request

import pandas as pd
from lxml import html

url = "https://en.wikipedia.org/wiki/List_of_busiest_airports_by_passenger_traffic"
req = urllib.request.Request(
    url, headers={"User-Agent": "table-to-csv-tutorial/1.0 (you@example.com)"}
)
page = urllib.request.urlopen(req).read().decode("utf-8")
doc = html.fromstring(page)

# 1. Drop footnote markers and text that is on the page but hidden.
junk = doc.xpath(
    '//sup[contains(@class, "reference")]'
    ' | //*[contains(@style, "display:none")]'
    ' | //*[contains(@style, "visibility:hidden")]'
)
for el in junk:
    el.drop_tree()

# 2. A red "down" arrow is an image, so the minus sign would be lost.
for img in doc.xpath('//img[@alt="Decrease"]'):
    minus = html.fromstring("&lt;span&gt;-&lt;/span&gt;")
    minus.tail = (img.tail or "").lstrip()  # keep the number written right after the image
    img.getparent().replace(img, minus)

clean = html.tostring(doc, encoding="unicode")

# 3. Parse every table that mentions "Total", keep the first one.
tables = pd.read_html(io.StringIO(clean), match="Total", thousands=",")
df = tables[0]

# 4. Whole numbers come back as 1.0 because of "1." and blank cells.
df["Rank"] = df["Rank"].astype("Int64")
df["Rank change"] = df["Rank change"].astype("Int64")

df.to_csv("airports.csv", index=False, encoding="utf-8-sig")
print(df.shape)
</code></pre>
<p>Put your own contact in the User-Agent. <code>match="Total"</code> returns the six yearly tables on the page, newest first, so <code>tables[0]</code> is the latest year. On a page where an infobox or navigation box also says "Total", check <code>len(tables)</code> and the columns of the table you pick. The <code>minus.tail</code> line matters on pages that put the number straight after the arrow, as in <code>&lt;td&gt;&lt;img alt="Decrease"&gt; 1.6%&lt;/td&gt;</code>: lxml's <code>replace</code> drops the text that follows the replaced element, so without it the cell would come out as just "-". <code>thousands=","</code> turns "106,302,208" into the number 106302208. <code>encoding="utf-8-sig"</code> writes the same UTF-8 marker as the console snippet, so Excel shows "Ōta" and "São Paulo" correctly. The file starts:</p>
<pre><code class="language-plaintext">Rank,Airport,Location,Country,Code (IATA/ICAO),Total passengers,Rank change,% change
1,Hartsfield–Jackson Atlanta International Airport,"Atlanta, Georgia",United States,ATL/KATL,106302208,,-1.6%
2,Dubai International Airport,"Garhoud, Dubai, Dubai",United Arab Emirates,DXB/OMDB,95192160,,3.1%
3,Tokyo Haneda Airport,"Ōta, Tokyo",Japan,HND/RJTT,91679814,1,6.7%
</code></pre>
<h2>Three things that quietly break the data</h2>
<p>None of these throw an error. You only notice when a total looks wrong.</p>
<ol>
<li><strong>Footnote markers.</strong> <code>[4]</code> sits inside the cell, so "106,302,208[4]" is text, not a number. Strip <code>sup.reference</code> (Wikipedia) or the site's own footnote element before you read the cell.</li>
<li><strong>Hidden padding.</strong> Wikipedia lines up numbers with invisible zeros (<code>&lt;span style="visibility:hidden"&gt;0&lt;/span&gt;</code>). The screen shows "95,192,160"; anything that reads the raw HTML sees "095,192,160". Read what is visible, or drop hidden elements first.</li>
<li><strong>Meaning carried by images.</strong> The change columns show a green up arrow or a red down arrow next to the number. The arrow is an image, so a fall of 1.6% turns into "1.6%" unless you turn the arrow back into a minus sign. In the 2025 table, 19 of the 50 rows had at least one down arrow. Any method that reads text loses this, so check columns with icons by eye.</li>
</ol>
<p>A fourth one bites when you open the file: Excel guesses the encoding of a CSV, and without a UTF-8 marker at the start it can show "SÃ£o Paulo" where "São Paulo" should be. Use "CSV UTF-8" when saving from Excel, <code>utf-8-sig</code> in pandas, or the <code>\uFEFF</code> line in the snippet.</p>
<h2>5. A browser extension</h2>
<p>If you do this often, or the data is not a <code>&lt;table&gt;</code> at all, an extension saves the steps. Several do this job. Table Capture is one of the most used in the Chrome Web Store (about 200,000 users when we looked in November 2026) and exports tables to the clipboard, Excel, CSV or Google Sheets.</p>
<p>Ours is <a href="https://skillmerc.com/list-table-scraper/?utm_source=hashnode&amp;utm_campaign=html-table-to-csv">List &amp; Table Scraper</a>, for Chrome and Firefox. Click its toolbar button and it outlines the table it found and shows a preview; "Try another" moves to the next table. Header cells become column names, and you can rename or remove a column before you click CSV, Excel or JSON. It also finds rows that are not in a table, such as search results and product cards, and it can follow a site's Next button: the free version reads up to 3 pages per run, and the paid Pro version up to 500. It runs in your browser and the data stays there until you download or copy it.</p>
<p>Whichever tool you use, respect each site's terms of use. Wikipedia's text is licensed CC BY-SA, so credit it if you publish the data.</p>
<p>Made by SKILLMERC.</p>
]]></content:encoded></item><item><title><![CDATA[How to build your Shopify [network_access] list before 8 December 2026]]></title><description><![CDATA[Disclosure: this guide comes from SKILLMERC, which makes the free Allowed Sources tools named in the last section. Every step before that works without…]]></description><link>https://skillmerc.hashnode.dev/how-to-build-your-shopify-network-access-list-before-8-december-2026</link><guid isPermaLink="true">https://skillmerc.hashnode.dev/how-to-build-your-shopify-network-access-list-before-8-december-2026</guid><category><![CDATA[shopify]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Security]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[SKILLMERC]]></dc:creator><pubDate>Wed, 02 Dec 2026 09:29:59 GMT</pubDate><content:encoded><![CDATA[<p><em>Disclosure: this guide comes from SKILLMERC, which makes the free Allowed Sources tools named in the last section. Every step before that works without them.</em></p>
<p>From 8 December 2026, Shopify rejects deploys of apps that run code on the online store and have not declared their network access. From <a href="https://shopify.dev/changelog/posts/network-access-declarations-are-now-required-for-apps-that-run-on-the-online-store">Shopify's changelog</a> (read 1 Dec 2026), for public apps:</p>
<blockquote>
<p>"December 8, 2026: Shopify rejects deploys and Shopify App Store submissions. Merchants see a warning in the Shopify admin. Existing app versions keep working."</p>
<p>"January 1, 2027: Shopify delists apps from the Shopify App Store and blocks new installs. Existing installs keep working."</p>
</blockquote>
<p>Custom apps installed outside your organization get rejected deploys from the same date. The post ends: "Update: The first deadline has been extended from December 1 to December 8, 2026."</p>
<p>A developer in the Shopify forum asked the real question on 1 December: "how can I verify that everything is properly handled?" Another developer replied with the plain answer: "Go through each app you own, find every outbound network call your code makes". This guide is that job, step by step.</p>
<h2>1. Check whether your app is in scope</h2>
<p>The changelog lists the features that make the declaration required:</p>
<ul>
<li>A theme app extension block or app embed.</li>
<li>Script tags on the online store.</li>
<li>An app proxy.</li>
<li>The <code>write_themes</code> access scope.</li>
<li>A web pixel with the <code>write_open_pixels</code> access scope.</li>
</ul>
<p>Apps that only write content such as metafields, menus or products are out. So are checkout UI extensions on their own and web pixels in the default strict sandbox. If your app is in scope but calls no outside servers, set <code>allowed_sources = []</code>. Shopify: "An empty list counts as a declaration."</p>
<h2>2. Find every host, part by part</h2>
<p>The rule, from <a href="https://shopify.dev/docs/apps/build/security/storefront/declare-network-access">Declare your app's network access</a>: "List every external server that your app's code loads from or sends requests to on the online store in <code>allowed_sources</code>. This covers your extensions, such as theme app extensions, and HTML or Liquid app proxy pages."</p>
<p>Go through each part of the app:</p>
<ul>
<li><strong>Theme app extensions.</strong> Read every Liquid file and every JS and CSS file. Look for <code>&lt;script src&gt;</code>, <code>&lt;link href&gt;</code>, <code>&lt;img src&gt;</code>, <code>fetch(</code>, <code>XMLHttpRequest</code>, <code>new WebSocket(</code>, and <code>@import</code> or <code>url(</code> in CSS. Leave out the extension's own files: "Leave out anything that Shopify serves, such as the files in a theme app extension's <code>assets</code> folder."</li>
<li><strong>App proxy pages.</strong> The HTML or Liquid your server returns runs on the storefront, so read those templates in your server code, not only in <code>extensions/</code>. The proxy URL itself stays out: "the store serves app proxy pages from its own domain."</li>
<li><strong>Script tags.</strong> The <code>src</code> of each script tag points at a server, and that script's own requests count too. These URLs often sit in server code that calls the Admin API, far from the extensions folder.</li>
<li><strong>Web pixels with <code>write_open_pixels</code>.</strong> Check where the pixel loads code from and where it sends events.</li>
<li><strong>Google Fonts.</strong> The same page says: "The console doesn't warn about Google Fonts. If your app uses them, then add both <code>https://fonts.googleapis.com</code> and <code>https://fonts.gstatic.com</code> to <code>allowed_sources</code>." The stylesheet comes from the first host and the font files from the second, so the second is easy to miss.</li>
</ul>
<p>A first pass from the shell finds the literal URLs:</p>
<pre><code class="language-bash">grep -rhoE "(https?|wss?)://[A-Za-z0-9.*-]+(:[0-9]+)?" extensions/ | sort -u
</code></pre>
<p>It misses protocol-relative addresses such as <code>//cdn.app.example.com</code>, hosts built from variables, hosts that a third-party script loads at run time, and proxy pages rendered on your server. Its output also holds link hosts and Shopify's own hosts, so sort each line before you paste it. That is why step 7 exists.</p>
<p>Links are a second, optional list. Hosts that your app sends customers to go in <code>allowed_navigation_hosts</code>, and Shopify "skips the exit interstitial" for links to them.</p>
<h2>3. Leave out admin-only hosts</h2>
<p>The <a href="https://shopify.dev/docs/apps/build/cli-for-apps/app-configuration#network_access">app configuration reference</a> says: "Don't list servers that only your app home or other pages in the Shopify admin use." Guides written from the 27 October changelog may still tell you to list admin hosts. The reference changed after that. A host that both your app home and the online store use stays in the list.</p>
<h2>4. Write each entry to Shopify's rules</h2>
<p>The rules for <code>allowed_sources</code>, from the reference:</p>
<ul>
<li>"Use a lowercase HTTPS origin with no path or trailing slash, such as <code>https://api.app.example.com</code>. If you include a port, then don't use the default port <code>443</code>."</li>
<li>"To cover the subdomains of a host, start it with <code>*.</code>, such as <code>https://*.cdn.app.example.com</code>. The wildcard doesn't cover <code>https://cdn.app.example.com</code> itself."</li>
<li>"Don't use IP addresses, <code>localhost</code>, Shopify domains, or a domain that many owners share, such as <code>https://s3.amazonaws.com</code> or <code>https://*.amazonaws.com</code>."</li>
</ul>
<p>Navigation hosts follow other rules: "Use a lowercase host name with no scheme, port, path, or wildcard". And <code>app.example.com</code> doesn't cover <code>pay.app.example.com</code>, so list each subdomain.</p>
<pre><code class="language-toml">[network_access]
allowed_sources = [
  "https://api.app.example.com",
  "https://cdn.app.example.com",
  "https://*.cdn.app.example.com",
  "https://fonts.googleapis.com",
  "https://fonts.gstatic.com",
]
allowed_navigation_hosts = [
  "app.example.com",
  "help.app.example.com",
]
</code></pre>
<p>The bare CDN host and its wildcard are both listed because the wildcard does not cover the bare host.</p>
<h2>5. Keep each list at 20 entries or fewer</h2>
<p>The reference says each list takes "up to 30". A Shopify staff reply in the <a href="https://community.shopify.dev/t/39655">developer forum</a> on 12 Nov 2026 said: "For now, allowed_sources and allowed_navigation_hosts each have a separate 20-entry limit." The <a href="https://shopify.dev/changelog/posts/secure-your-app-with-network-access-hosts-in-shopify-app-toml">27 October changelog</a> also says 20. A list of 20 or fewer meets both numbers. To cut a long list, drop admin-only hosts, drop files Shopify serves, and put subdomains you own under one wildcard.</p>
<h2>6. WebSocket origins</h2>
<p>The reference asks for HTTPS origins and names no WebSocket scheme, and developers have reported that <code>wss://</code> entries are refused. On 1 Dec 2026 a Shopify staff reply in <a href="https://community.shopify.dev/t/40050">the forum thread on this</a> said: "wss:// support is coming shortly. We'll post a changelog update once it's available." Until then, list the server's <code>https://</code> origin if your code also sends HTTPS requests to it, write down your <code>wss://</code> hosts, and watch the changelog.</p>
<h2>7. Test on a dev store</h2>
<p>The Test section of the declare page, in short:</p>
<ol>
<li>Create a dev store with the <strong>Network access testing</strong> feature preview.</li>
<li>Run <code>shopify app dev --store &lt;your-dev-store&gt;.myshopify.com</code> and keep it running. If an entry breaks the rules, "the command fails and shows the error".</li>
<li>Install no other app on that store. Shopify combines every app's <code>allowed_sources</code> into one policy, "so another app's entry can hide one that's missing from yours."</li>
<li>Add your app blocks, turn on the app embeds, open the browser console and use every feature on the <code>myshopify.com</code> address. Not in the theme editor preview: "Shopify doesn't add the Content Security Policy to theme previews".</li>
<li>Check that the page has a <code>Content-Security-Policy-Report-Only</code> header. A console warning for one of your servers usually means a missing <code>allowed_sources</code> entry; if that server is already listed, the declare page explains how to read the header. A link that shows the exit prompt is a missing navigation host.</li>
</ol>
<p>Shopify adds: "This feature preview is under development, and its behavior might change."</p>
<p>Then run <code>shopify app deploy</code> and release the version. Shopify checks the lists again and "rejects the deploy if an entry doesn't follow the rules in the network_access reference."</p>
<h2>Optional: tools that do the file scan</h2>
<p>If you would rather not grep by hand, we made three free tools that read your extension files and write the <code>[network_access]</code> block, with the file and line for every host they find:</p>
<ul>
<li>The <a href="https://skillmerc.com/allowed-sources/?utm_source=hashnode&amp;utm_campaign=allowed-sources">Allowed Sources Finder</a> in the browser. Your files are read on your device and never uploaded. Add your current <code>shopify.app.toml</code> and it also shows what is missing from your list.</li>
<li>The command line: <code>npx allowed-sources ./extensions --toml shopify.app.toml --check</code> (npm package <code>allowed-sources</code>, MIT, no dependencies).</li>
<li>The <a href="https://github.com/marketplace/actions/allowed-sources-check">Allowed Sources Check</a> GitHub Action, which fails a build when a host found in your files is missing from your list.</li>
</ul>
<p>They have the same limit as the grep above: they see only what is in the files. A pass does not prove your list is complete, and the dev store test is still the check that counts. Made by SKILLMERC. Not made or endorsed by Shopify.</p>
]]></content:encoded></item></channel></rss>