This file contains 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 webdriver_manager.chrome import ChromeDriverManager | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.chrome.options import Options | |
from dataclasses import dataclass, field, fields, InitVar, asdict | |
import csv | |
import json | |
import time | |
import os |
This file contains 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 webdriver_manager.chrome import ChromeDriverManager | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.chrome.options import Options | |
from dataclasses import dataclass, field, fields, InitVar, asdict | |
import csv | |
import time | |
import os |
This file contains 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 os | |
import time | |
import csv | |
import requests | |
from bs4 import BeautifulSoup | |
from dataclasses import dataclass, field, fields, InitVar, asdict | |
@dataclass | |
class Product: |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 8 columns, instead of 6. in line 6.
This file contains 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
Rank,book title,book price,rating,author,year of publication,genre,url | |
1,"Iron Flame (The Empyrean, 2)",18.42,4.1,Rebecca Yarros,2023,Fantasy Romance,amazon.com/Iron-Flame-Empyrean-Rebecca-Yarros/dp/1649374178/ref=zg_bs_g_books_sccl_1/143-9831347-1043253?psc=1 | |
2,The Woman in Me,20.93,4.5,Britney Spears,2023,Memoir,amazon.com/Woman-Me-Britney-Spears/dp/1668009048/ref=zg_bs_g_books_sccl_2/143-9831347-1043253?psc=1 | |
3,My Name Is Barbra,31.5,4.5,Barbra Streisand,2023,Autobiography,amazon.com/My-Name-Barbra-Streisand/dp/0525429522/ref=zg_bs_g_books_sccl_3/143-9831347-1043253?psc=1 | |
4,"Friends, Lovers, and the Big Terrible Thing: A Memoir",23.99,4.4,Matthew Perry,2023,Memoir,amazon.com/Friends-Lovers-Big-Terrible-Thing/dp/1250866448/ref=zg_bs_g_books_sccl_4/143-9831347-1043253?psc=1 | |
5,How to Catch a Turkey,5.65,4.8,Adam Wallace,2018,"Childrens, Fiction",amazon.com/How-Catch-Turkey-Adam-Wallace/dp/1492664359/ref=zg_bs_g_books_sccl_5/143-9831347-1043253?psc=1 | |
6,"Fourth Wing (The Empyrean, 1)",16.99,4.8,Rebecca Yarros,2 |
This file contains 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 the necessary libraries. | |
const puppeteer = require("puppeteer"); | |
const fs = require("fs"); | |
// Define the selectors for the elements we need to extract. | |
const selectors = { | |
allReviews: '#cm-cr-dp-review-list div.review', | |
authorName: 'div[data-hook="genome-widget"] span.a-profile-name', | |
reviewTitle: '[data-hook=review-title]>span:not([class])', | |
reviewDate: 'span[data-hook=review-date]', |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bulma CSS</title> | |
<!--Bulma CDN--> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css" | |
/> |
This file contains 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
<section> | |
<img src="https://www.lambdatest.com/logo.png" alt="Image 1"> | |
<img src="https://images.g2crowd.com/uploads/product/image/large_detail/large_detail_c8f5f4721cde3897dffa246c0e0bfce9/lambdatest-lambdatest.png" alt="Image 2"> | |
</section> |
This file contains 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
<section> | |
<img src="https://www.lambdatest.com/logo.png" alt="Image 1"> | |
<img src="https://images.g2crowd.com/uploads/product/image/large_detail/large_detail_c8f5f4721cde3897dffa246c0e0bfce9/lambdatest-lambdatest.png" alt="Image 2"> | |
</section> |
This file contains 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
<div class="parent"> | |
<div class="line"></div> | |
<p>Viewport Width: <span class="viewport"></span></p> | |
<div class="line"></div> | |
</div> | |
<div class="rectangle"> | |
<p>Box Width: <span class="box"></span></p> | |
</div> |
This file contains 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
<div class="parent"> | |
<div class="line"></div> | |
<p>Viewport Width: <span class="viewport"></span></p> | |
<div class="line"></div> | |
</div> | |
<div class="rectangle"> | |
<p>Font Size: <span class="box"></span></p> | |
</div> |
NewerOlder