Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import json
  2. import urllib.request
  3. import configparser
  4. import os
  5.  
  6. def createConfig(path):
  7. config = configparser.ConfigParser()
  8. config.add_section("Url")
  9. config.set("Url", "2ch.hk/rf", "json")
  10. config.set("Url", "rfch.xyz/rf", "json")
  11. config.set("Url", "2--ch.ru/rf", "html")
  12. with open(path, "w") as config_file:
  13. config.write(config_file)
  14.  
  15. createConfig('refuge.ini')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement