Comments (6)
Can you provide a code snipped and the result you get so I can check what the problem is? Thanks!
from opensea-scraper.
const OpenseaScraper = require("opensea-scraper");
run()
async function run(){
const options = {
debug: false,
logs: false,
sort: true,
browserInstance: undefined,
}
let nft = 'otherdeed'
let url = `https://opensea.io/collection/${nft}?search[sortAscending]=true
&search[sortBy]=PRICE
&search[toggles][0]=BUY_NOW`
let resultSize = 5; // if you need less than 32 offers, please use the function offers() instead
let result = await OpenseaScraper.offersByScrollingByUrl(url, resultSize, options);
console.dir(result, {depth: null}); // result object contains keys stats and offers
}
The screenshot of my result is shown below:
from opensea-scraper.
This is a good catch, as of current state the offersByScrollingByUrl
function seems to be broken. In fact, all function that include byScrolling
are currently still broken (see open issue #36).
But in the snippet you provided I see no need to use offersByScrolling
, you could simply use the offers
function:
const OpenseaScraper = require("opensea-scraper");
run();
async function run(){
const options = {
debug: false,
logs: false,
sort: true,
browserInstance: undefined,
};
let nft = 'otherdeed';
let result = await OpenseaScraper.offers(nft, options);
console.dir(result, {depth: null});
}
from opensea-scraper.
Thanks for your suggestion. It works!
I would confirm one thing - if I use offers
function, is there a way to control the number of outputs (for example, I'd only get 5 outputs from this function)?
Thanks
from opensea-scraper.
offers()
and offersByUrl()
by default return 32 results (but is currently broken, see #61). The only time it will return less than 32 results is when there are less than 32 items currently on sale (this might happen if you input an url that has a lot of filtering of traits, e.g. OpenseaScraper.offersByUrl("https://opensea.io/collection/boredapeyachtclub?search[sortAscending]=true&search[sortBy]=PRICE&search[stringTraits][0][name]=Clothes&search[stringTraits][0][values][0]=Black%20T&search[stringTraits][1][name]=Eyes&search[stringTraits][1][values][0]=Bored&search[toggles][0]=BUY_NOW"))
I am also not sure if I understand your question correctly. Can you specify:
- with "output" do you mean the number of results?
- were you curious why it was only 5 offers OR did you recieve a lot of offers but actually wanted to just return the top 5 offers?
from opensea-scraper.
thanks @kaiqiangh for the fix! 🎉
from opensea-scraper.
Related Issues (20)
- docs should warn that browserInstance requires stealth plugin HOT 6
- Code freezes when running `OpenseaScraper.rankings()` HOT 6
- [BUG] `offersByScrolling()` and `offersByScrollingByUrl()` not properly working HOT 44
- Not working when deployed (Heroku) HOT 7
- Not working when deployed (Google Cloud). TimeoutError: waiting for selector `.cf-browser-verification` to be hidden failed: timeout 30000ms exceeded HOT 4
- adding testnet HOT 12
- question HOT 1
- Reading from Activity page HOT 1
- [FEATURE REQUEST] scrape multiple pages of rankings HOT 4
- add support api key header for open sea HOT 5
- scrapping owner address from a collection HOT 2
- OpenseaScraper.rankings
- [FEATURE REQUEST] scrape collection activity HOT 3
- [BUG] Missing price in result HOT 2
- [BUG] Cannot get price HOT 10
- offersByScrolling() and offersByScrollingByUrl() does not work HOT 1
- How to scrape more than top 100? HOT 1
- floorprice is null HOT 6
- Can't obtain any information from opensea due to cloudflare HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opensea-scraper.