Comments (5)
I have done it on the following way. I hope that someone can find it useful:
page=0
while True:
page=page+1
str=("products?page=%d") % page
r=wcapi.get(str)
r_text=r.text
parsed = json.loads(r_text)
file=json.dumps(parsed, indent=4)
file_json = json.loads(file)
if file_json.len()<10:
break
from wc-api-python.
Try this:
wcapi.get('products?filter[limit]=100')
As far as I know it will deppend on which version of the Woocommerce API are you using.
Cheers.
from wc-api-python.
Thank you jlegido
What you have written it is not recognized.
However it would do the same as:
wcapi.get('products?per_page=100')
My problem is that I have, lets say 300 products and the maximum products per_page is 100.
wcapi.get('products?per_page=200') --> Do not work as 200>100
Furthermore I cannot ask for:
wcapi.get('products?per_page=100?page=2')
As it tells me that after per_page= everything should be an integer.
Any help would be really really welcome as I really need to get all the products downloaded.
Thank you very much 👍
from wc-api-python.
Just for share, the second ?:
wcapi.get('products?per_page=100?page=2')
should be &:
wcapi.get('products?per_page=100&page=2')
from wc-api-python.
This limit does not come from this library, this limit is from WP REST API.
from wc-api-python.
Related Issues (20)
- POST accepts JSON string but not a dictionary
- How to retrieve order data based on modified date? HOT 2
- Request return none with per_page argument HOT 2
- Problem with new format of Let's Encrypt certificate HOT 1
- Documentation Error HOT 3
- [Slow performance] - two seconds for each call HOT 7
- low_stock_amount is string
- Basic import doesn't work HOT 2
- Fetching 'products' fails with a 403 error despite other successful API calls HOT 3
- unable to update a product HOT 3
- Issue using POST to batch update products HOT 1
- is this repo alive ??
- is this repo alive ?? HOT 2
- Pagination support HOT 1
- Swatch Label / Swatch Color hex in post products attributes terms
- issue JSONDecodeError when getting product
- response 404 or 500 when getting products/sales from woocommerce using python
- Install issue related to Apple silicon
- Plan to use WP API instead of WC Legacy REST API?
- response.status_code on insert a product HOT 3
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 wc-api-python.