write me an one page software using html, javascript, css to allow user input with beautifulsoup style selector for scraping, need to have the following features
allow user input of beautifulsoup style selector, e.g. [data-testid="pricing"]
you can suggest the best library for scraping, no need to stick to beautifulsoup
once the input is confirmed, it added to a internal record and stores them as cookies
this record contains name, the selector
the UX, the whole thing is display as a table, the table display, the name, selector, the result/error, a timestamp for last execution, a button to execute the selector at that row, a button to remove the row, a burger menu style button at the first column which allows drag to rearrange the rows
this table display, the internal record and execute the them upon loading of the page. i.e. load the record from cookie if it exist, otherwise it can be empty array
the last row is the input for the user to add more record and the execute button execute it and save the new record to internal cookie and automatic create a new row for more input
existing row, the name, selector are displayed using textfield such that changes can be made and executing it manually modify it accordingly
Assistant
To create a simple web-based application with HTML, JavaScript, and CSS that allows users to input and manage web scraping tasks using a scraping library like BeautifulSoup (or its JavaScript equivalent) and store records in cookies, we'd typically start by building the front-end interface and incorporating the scraping logic. For scraping in JavaScript, Puppeteer is a common choice for its ability to handle modern web pages. Here's a minimal, conceptual example:
Library Choice: Using Puppeteer or a similar library for web scraping if you need to work in JavaScript environments.
User Interface: Designed using HTML inputs inside a table, allowing for easy modification and action on each record.
Cookies: Used to persistently store records.
Execution Button: Executes the scraper logic and updates the table with the results and the timestamp.
Drag & Rearrange: Actual drag-and-drop functionality would require a library like Sortable.js.
Note: Puppeteer requires execution within a Node.js environment or server-side rendering context (not directly runnable in a browser, hence scripted execution is conceptual here).
This example provides the foundational structure, and the real scraping logic, especially involving Puppeteer, would require additional setup outside of pure client-side execution.