
Following the Microsoft tutorial for building a .Net Standard library with Visual Basic from here, I have decided to make a video for .Net Standard library with C#. Pretty much, it is one and the same. The library contains one…
There are quite a few methods for writing data from a text file to Excel. The main are the following: Through a Query Table Through opening the text file and Reading and writing line by line Reading the text file,…
Although there are plenty of other tools for extracting data from a website (take a look at Beautiful Soup), VBA is somehow good, because … well, because it is somehow challenging to do it every time. Yesterday, I answered a…
About 4 years ago, I wrote an article about prime numbers in Excel and their visualisation with VBA – vba-function-in-excel-to-check-prime-numbers. Pretty much, it displays the prime numbers in a 10 x N matrix, starting from 1 and finishing at N:…
After reading the database to python from the previous post here, it is time to do the ADD data to the database. Our database is created like this:
1 2 3 4 5 |
CREATE TABLE "drummers" ( "Id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "Name" TEXT, "Band" TEXT ) |
The database has autoincremented primary key, thus we do not need…
Showing all links from a website with Python and BeautifulSoup is actually 6 lines of code – 2 to define the used libraries and 4 to do the job:
1 2 3 4 5 6 7 8 |
import urllib.request from bs4 import BeautifulSoup resp = urllib.request.urlopen("https://www.vitoshacademy.com") soup = BeautifulSoup(resp, from_encoding=resp.info().get_param('charset')) for link in soup.find_all('a', href=True): print(link['href']) |
In general, BeautifulSoup comes out of the box with beautiful…