Coder Social home page Coder Social logo

wp-json-scraper's Issues

No encoding, then missing module

Hi there,

Upon running this, I get an error that many files are missing their encoding.

SyntaxError: Non-ASCII character '\xc3' in file WPJsonScraper.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

So I just follow the error and give each file a utf-8 encoding and re-run the program. Then what happens next is that that it's missing a module:

Traceback (most recent call last):
  File "WPJsonScraper.py", line 31, in <module>
    from lib.wpapi import WPApi
  File "/Users/Nirawit/Desktop/wp-json-scraper-0.4/lib/wpapi.py", line 26, in <module>
    from urllib.parse import urlencode
ImportError: No module named parse

How do I go about fixing this? Thank you

Encoding error on Windows pyton3

python3 WPJsonScraper.py http://OOOOOO.com --export-posts /posts

�[94m[*] Testing connectivity with the server�[0m
�[92m[+] Connection OK�[0m
Number of entries: 991
|██████████████████████████████████████████████████████████████████████| 100.0%
Number of entries: 635
|██████████████████████████████████████████████████████████████████████| 100.0%
Number of entries: 7
|██████████████████████████████████████████████████████████████████████| 100.0%
Number of entries: 2
|██████████████████████████████████████████████████████████████████████| 100.0%

Traceback (most recent call last):
File "WPJsonScraper.py", line 360, in
main()
File "WPJsonScraper.py", line 319, in main
post_number = Exporter.export_posts(posts_list,
File "C:\deneme\wp-json-scraper\lib\exporter.py", line 210, in export_posts
post_file.write(buffer)
File "C:\Python38\lib\encodings\cp1254.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 6146-6152: character maps to

Json Decoder Error

How can I solve this ?

python .\WPJsonScraper.py -i "https://guvenliksistemleri.net"

Traceback (most recent call last):
  File ".\WPJsonScraper.py", line 365, in <module>
    main()
  File ".\WPJsonScraper.py", line 231, in main
    basic_info = scanner.get_basic_info()
  File "C:\Users\User\Desktop\wp-json-scraper-master\wp-json-scraper-master\lib\wpapi.py", line 89, in get_basic_info
    self.basic_info = req.json().read().decode('utf-8-sig')
  File "C:\python3\lib\site-packages\requests\models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\python3\lib\json\__init__.py", line 337, in loads
    raise JSONDecodeError("Unexpected UTF-8 BOM (decode using utf-8-sig)",
json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)

How can i scrape only one post link ?

How can I export only the post in the link you specified instead of all the posts?

Like;
.\WPJsonScraper.py --one-post "https://guvenliksistemleri.net/en-iyi-kaliteli-guvenlik-kamerasi-markalari/"

buddypress/buddydrive/xprofile support

hi, great work

i'm having difficulty with buddypress/buddydrive/xprofile installs. also, is it possible to list wp-blocks? thank you thank you tha nk you!

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

$ 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'

Export to JSON

Hello is it possible to export to JSON instead of HTML?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.