uopspop

Untitled

Nov 8th, 2019
136
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2.  
  3. import json
  4. import io
  5.  
  6. with io.open('result.jl', 'r') as f:
  7.     # ...
  8.     for line in f:
  9.         # text = line.encode('utf-8-sig')[3:].decode('utf-8-sig') # this works too
  10.         line = line.encode('utf-8')[3:].decode('utf-8')  # this works too
  11.         jsonObj = json.loads(line)
  12.         print(jsonObj['book_name'])
  13.         print(jsonObj)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×