Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwieds committed Jun 19, 2024
1 parent 5e34bbf commit 04bfead
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<br>
</p>

## What is Social Selectors?
## 🚀 What is Social Selectors?
SO... you're trying to get the css selector for the _follow button_ on Twitter. **Which would you rather use?**

```js
Expand All @@ -38,7 +38,7 @@ SO... you're trying to get the css selector for the _follow button_ on Twitter.
Well, now you don't have to manage those ugly, system generated css selectors anymore!
Introducing **SocialSelectors**: a dynamically updated library of css selectors for social media sites.

## Supported Sites
## 🦄 Supported Sites
* Instagram
* Twitter
* SoundCloud _(coming soon!)_
Expand All @@ -50,7 +50,7 @@ Introducing **SocialSelectors**: a dynamically updated library of css selectors
npm install social-selectors
```

## Using SocialSelectors
## ⚡️ Using SocialSelectors
```js
const SocialSelectors = new (require('social-selectors'));
SocialSelectors.load({
Expand All @@ -74,15 +74,14 @@ SocialSelectors.load({
});

})

```

## How do I find the paths for the selectors?
### How do I find the paths for the selectors?
The easiest way to get the path for the selectors is to view the src JSON files in the repo. For example if you want to find the paths for Instagram, open [https://github.com/itw-creative-works/social-selectors/blob/master/src/libraries/instagram/main.json](/src/libraries/instagram/main.json). Each site has two main sections in the JSON file: `globals` and `pages`. And `pages` is where you'll find the selectors broken down for each page on the site.

So if you wanted the selector for the like button on an Instagram post, you would come up with `pages.post.elements.likeButton.selector`.

## Why use SocialSelectors?
## 📘 Why use SocialSelectors?
* Does your app scrape social media sites or rely on their css elements in any way?
* Are you annoyed with having to meticulously update your css selectors to successfully scrape these elements?
This library solves that problem by providing an api with *static* css paths that get translated into the current css selectors!
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "social-selectors",
"version": "0.2.8",
"version": "1.0.0",
"description": "A library of selectors for CSS elements on social media sites.",
"main": "module/index.js",
"scripts": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"lighthouse": "lighthouse --output json --output html --output-path ./@output/lighthouse/lighthouse-report.html"
},
"engines": {
"node": ">=6.0.0"
"node": ">=12"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 04bfead

Please sign in to comment.