This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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, ): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from lxml import html | |
import json | |
URL = "https://books.toscrape.com/" | |
username = "" | |
password = "" | |
hostname = "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]') |