Skip to content

Instantly share code, notes, and snippets.

View vivekthedev's full-sized avatar

Vivek Kumar Singh vivekthedev

  • India
View GitHub Profile
@vivekthedev
vivekthedev / export_note.py
Created April 26, 2025 08:11
Download NotebookLM notes as PDF
# pip install beautifulsoup4==4.13.4 markdown_pdf==1.7
from bs4 import BeautifulSoup
from bs4.element import Tag
import re
from markdown_pdf import MarkdownPdf, Section
note_data = open("notes.txt", "r", encoding="utf-8").read()
soup = BeautifulSoup(note_data, "html.parser")
def drill_into_tag(tag, ):
@vivekthedev
vivekthedev / maps_scrape.py
Last active February 22, 2025 11:27
Scraping tutorial Article for BrightData
# requirements.txt
# selenium==4.28.1
# schedule==1.2.2
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
import csv
import schedule
@vivekthedev
vivekthedev / static_scrape.py
Created July 19, 2024 11:51
lxml Scraping Tutorial Code - Proxy Scrape
import requests
from lxml import html
import json
URL = "https://books.toscrape.com/"
username = ""
password = ""
hostname = ""
@vivekthedev
vivekthedev / dynamic_scrape.py
Created July 19, 2024 11:50
lxml Scraping Tutorial Code - Dynamic Scrape
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from lxml import html
from time import sleep
import json
URL = "https://www.youtube.com/@freecodecamp/videos"
@vivekthedev
vivekthedev / static_scrape.py
Created July 19, 2024 11:45
lxml Scraping Tutorial Code - Static Scrape
import requests
from lxml import html
import json
URL = "https://books.toscrape.com/"
content = requests.get(URL).text
parsed = html.fromstring(content)
all_books = parsed.xpath('//article[@class="product_pod"]')