MickaelWalter / wp-json-scraper

Scrapes WordPress data using the WP-JSON API activated by default since WordPress 4.7
MIT License
97 stars 26 forks source link

TypeError: '>=' not supported between instances of 'NoneType' and 'int' #16

Open milahu opened 1 year ago

milahu commented 1 year ago
$ python wp-json-scraper/WPJsonScraper.py https://somepage.com/ \
--export-posts somepage/posts \
--export-pages somepage/pages \
--export-comments somepage/comments \
--download-media somepage/media

[*] Testing connectivity with the server
[+] Connection OK
Total number of entries: 2205
 |██████████████████████████████████████████████████████████████████████| 100.0% 
Total number of entries: 64
 |██████████████████████████████████████████████████████████████████████| 100.0% 
Total number of entries: 27
 |██████████████████████████████████████████████████████████████████████| 100.0% 
Total number of entries: 2
 |██████████████████████████████████████████████████████████████████████| 100.0% 

[+] Exported 2205 posts to somepage/posts
Total number of entries: 78
 |██████████████████████████████████████████████████████████████████████| 100.0% 

[+] Exported 78 pages to somepage/pages
Total number of entries: 2205
 |██████████████████████████████████████████████████████████████████████| 100.0% 
Traceback (most recent call last):
  File "wp-json-scraper/WPJsonScraper.py", line 394, in <module>
    main()
  File "wp-json-scraper/WPJsonScraper.py", line 365, in main
    post_list = scanner.get_posts(True)
  File "wp-json-scraper/lib/wpapi.py", line 394, in get_posts
    self.posts = self.update_cache(self.posts, posts, total_entries, start, num)
  File "wp-json-scraper/lib/wpapi.py", line 345, in update_cache
    if start >= total_entries:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'