Hunt down social media accounts by username across social networks (Mirror repo)
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

33 řádky
981 B

  1. """Sherlock: Supported Site Listing
  2. This module generates the listing of supported sites
  3. which can be found in sites.md
  4. It also organizes all the sites in alphanumeric order
  5. """
  6. import json
  7. pool = list()
  8. with open("sherlock/resources/data.json", "r", encoding="utf-8") as data_file:
  9. data = json.load(data_file)
  10. with open("sites.md", "w") as site_file:
  11. data_length = len(data)
  12. site_file.write(f'## List Of Supported Sites ({data_length} Sites In Total!)\n')
  13. for social_network in data:
  14. url_main = data.get(social_network).get("urlMain")
  15. pool.append((social_network, url_main))
  16. index = 1
  17. for social_network, url_main in pool:
  18. site_file.write(f'{index}. [{social_network}]({url_main})\n')
  19. index = index + 1
  20. sorted_json_data = json.dumps(data, indent=2, sort_keys=True)
  21. with open("sherlock/resources/data.json", "w") as data_file:
  22. data_file.write(sorted_json_data)
  23. print("Finished updating supported site listing!")