Skip to the content Skip to the Navigation

Red And Green

  • Python Code
  • Rust Programming
  • Bitcoin Programming
  • Contact

admin

  1. HOME
  2. admin
April 21, 2021 / Last updated : April 21, 2021 admin Python Code

Read Scrapy ‘start_urls’ from csv file

How can the start_urls for scrapy be imported from csv? Using a list comprehension and a csv file you can make Scrapy get specific URLs from a predefined list use the .strip() method to remove newline characters Here you can see the line.strip() is performing the removal: [line.strip() for line in file] Demonstration of how […]

April 16, 2021 / Last updated : April 16, 2021 admin Python Code

How to web scrape iframes with scrapy

Web Scraping pages with iframes in can be done with Scrapy if you use a separate URL to access the data inside the iframe. You need to identify the name of the page of the iframe and then append that to your base url to provide a 2nd URL for the Scrapy spider to visit. […]

April 9, 2021 / Last updated : February 13, 2023 admin Python Code

How to scrape iframes

If you are scraping a website with pop up messages asking you to agree to accept cookies. This can prevent your scraper from continuing to the pages you want to scrape. How do you get past these? Using Selenium you need to switch to the iframe (which you can identify using browser tools / inspect […]

March 12, 2021 / Last updated : March 12, 2021 admin Python Code

Comparing values in SQL against previously scraped data

If you have scraped data on more than one occasion and want to check if a value has changed in a column since the previous scrape you could use this: select col1, col2  from TABLENAME  group by col1, col2  having count(col2) <2 This will compare and check if a value for col2 has changed since the previous scrape Let’s put some real names […]

March 9, 2021 / Last updated : February 14, 2023 admin Python Code

Parsing Scraped Data with Pandas

Once you have some data you’ll need to find the relevant parts and use them for further analysis. Rather than use the proverbial Excel sheet you can write code to automate the task. Consider the following : The following code will match where the row contains “Djibouti” and return the value that is in the […]

March 1, 2021 / Last updated : March 1, 2021 admin Python Code

Debugging Python Code

& using Snippets This article will cover how to achieve the following, using Python : Reduce the need for print statements Reduce the need to type repetitive code Why not automate some of your coding to allow you to automate the ‘boring stuff’ – anything that you do regularly could be saved as a snippet […]

February 15, 2021 / Last updated : February 15, 2021 admin Python Code

Scrapy response.meta

capture your start urls in your output with Scrapy response.meta Every web scraping project has aspects that are different or interesting and worth remembering for future use. This is a look at a recent real world project and looks saving more than one start url in the output. This assumes basic knowledge of web scraping, […]

February 10, 2021 / Last updated : February 10, 2021 admin MySQL

Add data to a database from a CSV using Python, Pandas, and SQL

Do you have a CSV file and a database to transfer the data into? The data needs to go into your database and you want to automate this? For instance : you have been web scraping and extracted publicly available data and now need to store it in a database table? This guide will show […]

January 21, 2021 / Last updated : January 21, 2021 admin Python Code

regex examples

Sooner or later you will need to resort to using regular expressions if you are scraping text. This article will show you some useful Python (version 3) examples which you can use over and over again.. We’ll be using “re.search” and “group” example 1 – parse a paragraph of text for the number of floors, […]

January 6, 2021 / Last updated : February 23, 2023 admin Python Code

Back Up MySQL

Back up your MySQL database (on a Raspberry Pi) Once in production you will need to ensure you have a copy of your data for many reasons which we can all identify with. So, before getting too far into a web scraping project using Scrapy with MySQL let’s spare a moment to get familiar with […]

Posts pagination

  • «
  • Page 1
  • …
  • Page 20
  • Page 21
  • Page 22
  • Page 23
  • »

Recent Posts

workspaces in rust

Rust Workspaces

May 19, 2025
This Actix-Web Rust server handles messages and tracks server status. It shares state using `Mutex`-protected `HashMap` and `String`. Clients can `GET` or `POST` a message and `GET` a list of servers. State is initialized in `main` and injected into request handlers for simple thread-safe access.

App state in Actix-web

May 17, 2025
Multiple LLM Backends

Protected: Chain Multiple LLM backends in Rust

May 12, 2025

Understanding Encrypted Counters in Rust with RocksDB

May 11, 2025

Protected: Build your first MCP server in Rust and test it with an LLM

May 6, 2025
OpenAPI & FastAPI Generation Automatically generate FastMCP servers from existing OpenAPI specifications (FastMCP.from_openapi()) or FastAPI applications (FastMCP.from_fastapi()), instantly bringing your web APIs to the MCP ecosystem.

Protected: Build an MCP Server from OpenAPI Spec

May 5, 2025
Schemars in Rust

Schemars in Rust: Beyond Basic Structs

May 1, 2025
podman v docker

Getting Started with Podman

April 30, 2025
as_ref

as_ref and Cow

April 30, 2025
what-are-resources

Protected: Dynamic Resources – MCP protocol

April 23, 2025

Category

  • AI ML
  • automation
  • Bitcoin Programming
  • c
  • ebay api
  • email
  • JavaScript
  • LangChain
  • MySQL
  • Pandas
  • postgres
  • Python Code
  • Raspberry Pi
  • requests
  • Rust Programming
  • Scrapy
  • Selenium
  • Smart Contracts
  • Stellar
  • SurrealDB
  • Uncategorized
  • web scraping

Archive

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • November 2022
  • September 2022
  • November 2021
  • September 2021
  • August 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • March 2020

Actix-web AI API async Automation axum BDK bitcoin Bitcoin Core blockchain class Closure closures Design Patterns dictionaries GitHub huggingface iced impl langchain LLM MCP ModelContextProtocol mutable Networks Podman python Qdrant raspberry pi Rust Programming scrapy Smart Contracts Sphinx Stellar struct SurrealDB Upsert VectorDatabase Vectors WASM webscraping web scraping Word DOCX xpath Yaml

  • email
  • github
  • YouTube
This site is hosted with https://webdock.io/en Fast Cloud VPS Hosting Flat fee all-inclusive VPS with a Free Control Panel

Copyright © Red And Green All Rights Reserved.

Powered by WordPress & Lightning Theme by Vektor,Inc. technology.

MENU
  • Python Code
  • Rust Programming
  • Bitcoin Programming
  • Contact
Translate ยป