python - Extract URL from .url file -


is possible read actual url .urlfile, described here, python?

in following image instance, can print mapbox-osm bright- carto template openstreetmap data extract actual url: https://github.com/mapbox/osm-bright

enter image description here

i need extract hundreds of urls , using batch file job done, rather python. using python 2.7.11 3 possibility well.

i assume mean url file described here. files have syntax similar .ini-files , can parsed this:

import configparser  config = configparser.rawconfigparser() config.read('example.url')  try:     url = config.get('internetshortcut', 'url')  # classic url format except configparser.nooptionerror:     url = config.get('default', 'baseurl')  # extended url format 

Popular posts from this blog

node.js - How do I prevent MongoDB replica set from querying the primary? -

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file -