Skip to content

Instantly share code, notes, and snippets.

window.cpAdapter = {
getProductTitle: function () {
try {
const [pageData] = window.dataLayer
return pageData.goods.title
} catch (err) {
console.error(err)
return ""
}
},
window.cpAdapter = {
getProductTitle: function () {
try {
const [pageData] = window.dataLayer
return pageData.goods.title
} catch (err) {
console.error(err)
return ""
}
},

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@webrulon
webrulon / About Content
Created May 6, 2022 20:35 — forked from Tom0901/About Content
Next Tut Strapi Content
Body:
# About DEV.io
DEV.io is all about inspiring and educating software engineers and web developers in the UK. Success in the software industry relies on collaboration and continuous learning. Here at DEV.io we hope that we can provide a platform to drive your growth and achieve your goals.
# Meet Our Team
Our application is developed and maintained by a small team with tonnes of passion for what they do. It's also completely open source, so feel free to poke around the codebase and contributors are always welcome. Here's a picture of our current team.
@webrulon
webrulon / nginxproxy.md
Created May 5, 2022 17:53 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@webrulon
webrulon / my.cnf
Created January 26, 2021 20:18 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on cPanel/WHM servers)
# === Optimized my.cnf configuration for MySQL/MariaSQL on cPanel/WHM servers ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@webrulon
webrulon / ocp.php
Created February 8, 2014 00:27 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs