<?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: Xiangyu Lu</title>
    <description>The latest articles on DEV Community by Xiangyu Lu (@luciusdata).</description>
    <link>https://dev.to/luciusdata</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4273434%2F045ee596-f2f9-4101-8674-3f92cd56cc9a.png</url>
      <title>DEV Community: Xiangyu Lu</title>
      <link>https://dev.to/luciusdata</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/luciusdata"/>
    <language>en</language>
    <item>
      <title>I sent my AI agent out to earn money — steal the exact prompt</title>
      <dc:creator>Xiangyu Lu</dc:creator>
      <pubDate>Tue, 01 Dec 2026 07:29:21 +0000</pubDate>
      <link>https://dev.to/luciusdata/i-sent-my-ai-agent-out-to-earn-money-steal-the-exact-prompt-2lgb</link>
      <guid>https://dev.to/luciusdata/i-sent-my-ai-agent-out-to-earn-money-steal-the-exact-prompt-2lgb</guid>
      <description>&lt;p&gt;Someone else's Muse just posted its pay slip: $13 claimed from an AI bounty competition, plus referral rewards rolling in daily. The platform is make.fun — sponsor-funded bounties where AI agents build things and the best entries get paid in USDC.&lt;/p&gt;

&lt;p&gt;I'm running the same experiment. My agent has already entered 3 bounties (a news-summary image, a Black Friday deal-finder site, and a turkey escape game). Honest status: all three are still waiting on final judging, so $0 won so far. The other guy's $13 proves the prizes are real — now it's a judging lottery.&lt;/p&gt;

&lt;p&gt;Want to send your own agent out to work? Copy this prompt and paste it to your Muse:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Sign up at &lt;a href="https://make.fun/r/71x8mvd7" rel="noopener noreferrer"&gt;https://make.fun/r/71x8mvd7&lt;/a&gt; (if you don't have an account), using referral code 71x8mvd7. Then enter the bounty competitions: do any task that has a prize, start with the highest-reward ones, and claim the rewards automatically when you win.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Full transparency: that link is my referral link. If your agent wins, make.fun pays me 10% on top — it never comes out of your winnings — for 90 days. You lose nothing, I get a coffee fund.&lt;/p&gt;

&lt;p&gt;I'll post the results when the judging lands, win or lose. Brave people enjoy the world first. 🚀&lt;/p&gt;

</description>
      <category>ai</category>
      <category>sidehustle</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Watch: turn any web table into a CSV in 30 seconds (no copy-paste)</title>
      <dc:creator>Xiangyu Lu</dc:creator>
      <pubDate>Tue, 01 Dec 2026 07:15:53 +0000</pubDate>
      <link>https://dev.to/luciusdata/watch-turn-any-web-table-into-a-csv-in-30-seconds-no-copy-paste-58jc</link>
      <guid>https://dev.to/luciusdata/watch-turn-any-web-table-into-a-csv-in-30-seconds-no-copy-paste-58jc</guid>
      <description>&lt;p&gt;Tired of copying web tables into Excel by hand — cell by cell, losing formatting along the way? There is a faster way.&lt;/p&gt;

&lt;h2&gt;
  
  
  🎥 Watch the demo (37 seconds)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/luciusdata/table-to-csv/blob/main/video-p1-table-to-csv.mp4" rel="noopener noreferrer"&gt;▶️ Watch the video demo: video-p1-table-to-csv.mp4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this short vertical demo, I take a table from a W3Schools page and turn it into a clean CSV with one Python script — no copy-paste, no manual cleanup. (dev.to doesn't host video files, so the demo video lives in the free GitHub repo linked above — click to watch it play in your browser.)&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works — in three lines
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;pandas.read_html()&lt;/code&gt; finds every table on the page.&lt;/li&gt;
&lt;li&gt;Pick the table you want.&lt;/li&gt;
&lt;li&gt;Save it with &lt;code&gt;to_csv()&lt;/code&gt; — done, with proper headers.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Get the free script
&lt;/h2&gt;

&lt;p&gt;👉 Free repo: &lt;a href="https://github.com/luciusdata/table-to-csv" rel="noopener noreferrer"&gt;https://github.com/luciusdata/table-to-csv&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install -r requirements.txt
python 02_table_to_csv.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Want the full toolkit?
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;Web Scraping Starter Kit ($3)&lt;/strong&gt; includes 8 ready-to-run scrapers — pagination, product prices, business contacts, sitemap crawling, JSON APIs and CSV cleaning.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://luciusdata.gumroad.com/l/sbpiem" rel="noopener noreferrer"&gt;https://luciusdata.gumroad.com/l/sbpiem&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you ever wasted an afternoon copying a table by hand? Tell me in the comments. 👇&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>I got tired of copy-pasting website tables into Excel, so I automated it with 30 lines of Python</title>
      <dc:creator>Xiangyu Lu</dc:creator>
      <pubDate>Mon, 30 Nov 2026 05:57:05 +0000</pubDate>
      <link>https://dev.to/luciusdata/i-got-tired-of-copy-pasting-website-tables-into-excel-so-i-automated-it-with-30-lines-of-python-2fbg</link>
      <guid>https://dev.to/luciusdata/i-got-tired-of-copy-pasting-website-tables-into-excel-so-i-automated-it-with-30-lines-of-python-2fbg</guid>
      <description>&lt;p&gt;If you have ever spent an afternoon copying a product table off a website row by row, this is the fix.&lt;/p&gt;

&lt;p&gt;You only need two libraries: &lt;code&gt;requests&lt;/code&gt; to fetch the page, and &lt;code&gt;BeautifulSoup&lt;/code&gt; to pull the table out. Find the table, loop over its rows, write each row to a CSV file — that is genuinely most of the job for public, static pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;bs4&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;BeautifulSoup&lt;/span&gt;

&lt;span class="no"&gt;HEADERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"User-Agent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Mozilla/5.0 (compatible; StarterKitBot/1.0)"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;table_to_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;table_index&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;HEADERS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;soup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BeautifulSoup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"lxml"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;tables&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;soup&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"table"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;tables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"No &amp;lt;table&amp;gt; found. The data might be loaded by JavaScript."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;

    &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tr&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tables&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;table_index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"tr"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;cells&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_all&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"th"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"td"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;cell&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;cell&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cells&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;output_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"w"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newline&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writerows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Saved {len(rows)} rows to {output_path}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;table_to_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://example.com/prices"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"prices.csv"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install requests beautifulsoup4 lxml
python table_to_csv.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;prices.csv&lt;/code&gt; in Excel or Google Sheets and you are done.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parts that actually trip people up
&lt;/h2&gt;

&lt;p&gt;The scraping itself is the easy part. The things that eat your afternoon are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pagination&lt;/strong&gt; — the data you want is spread across 20 pages, and each page needs the same treatment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cleaning the output&lt;/strong&gt; — merged cells, stray whitespace, prices stored as text with currency symbols.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Picking the right table&lt;/strong&gt; — pages often have more than one &lt;code&gt;&amp;lt;table&amp;gt;&lt;/code&gt;. The &lt;code&gt;--index&lt;/code&gt; flag in the full version lets you choose which one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript-loaded pages&lt;/strong&gt; — if &lt;code&gt;find_all("table")&lt;/code&gt; comes back empty, the table probably renders in the browser after load, and &lt;code&gt;requests&lt;/code&gt; alone will not see it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A polite &lt;code&gt;User-Agent&lt;/code&gt;, a short delay between pages, and a quick look at the site's &lt;code&gt;robots.txt&lt;/code&gt; keep you out of most trouble on public pages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this goes next
&lt;/h2&gt;

&lt;p&gt;The full version of this script (with the &lt;code&gt;--index&lt;/code&gt; flag and proper error messages) is free on my GitHub: &lt;a href="https://github.com/luciusdata/table-to-csv" rel="noopener noreferrer"&gt;https://github.com/luciusdata/table-to-csv&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I packaged the versions I actually reuse — table-to-CSV, multi-page listings, product prices, business contacts, a sitemap sweep, JSON API-to-CSV, and a CSV cleaner — into a small starter kit with a plain-English guide. It is $3 while the store is new: &lt;a href="https://luciusdata.gumroad.com/l/sbpiem" rel="noopener noreferrer"&gt;https://luciusdata.gumroad.com/l/sbpiem&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Happy to answer questions about the approach in the comments, whether you grab the kit or not.&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
