Skip to content

Instantly share code, notes, and snippets.

View dreamerchandra's full-sized avatar
🤓
Exploring

Chandrakumar dreamerchandra

🤓
Exploring
  • chennai
View GitHub Profile
@dreamerchandra
dreamerchandra / fruit-scrap.js
Created February 19, 2025 12:52
swiggy, zepto and bb food scrap
links =
`https://www.bigbasket.com/ps/?q=pomegranate&nc=as&page=1&filter=%5B%7B%22name%22%3A%22Categories%22%2C%22type%22%3A%22category%22%2C%22values%22%3A%5B%7B%22id%22%3A1344%2C%22name%22%3A%22Fresh+Fruits%22%2C%22image%22%3A%22%22%2C%22slug%22%3A%22fresh-fruits%22%2C%22level%22%3A1%2C%22url%22%3A%22%2Fpc%2Ffruits-vegetables%2Ffresh-fruits%22%2C%22is_selected%22%3Afalse%7D%5D%7D%5D
https://www.bigbasket.com/ps/?q=apple&nc=as&page=1&filter=%5B%7B%22name%22%3A%22Categories%22%2C%22type%22%3A%22category%22%2C%22values%22%3A%5B%7B%22id%22%3A1344%2C%22name%22%3A%22Fresh+Fruits%22%2C%22image%22%3A%22%22%2C%22slug%22%3A%22fresh-fruits%22%2C%22level%22%3A1%2C%22url%22%3A%22%2Fpc%2Ffruits-vegetables%2Ffresh-fruits%22%2C%22is_selected%22%3Afalse%7D%5D%7D%5D`.split(
"\n"
);
const constructValues = (name, pack, price, tag) => {
return [
name.replaceAll(",", " ").replaceAll('\n', ' '),
pack.replaceAll(",", " ").replaceAll('\n', ' '),
@dreamerchandra
dreamerchandra / object-watch.js
Last active January 23, 2019 22:15 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
//Original code : https://gist.github.com/eligrey/384583
// modification
//Objects like JSON can be observed using this
if (!Object.prototype.watch) {
Object.defineProperty(
Object.prototype,
"watch", {
enumerable: false,
configurable: true,
writable: false,