I've got a script in python to run in pythonista on my iPhone. I am trying to change a URL of the form: https://www.evernote.com/shard/s2/sh/xxx/yyy to a URL of the form: evernote:///view/79211/s2/xxx/xxx/
It all seems to be working fine except for the replace command. I get the following error: TypeError: replace() takes at least 2 arguments (1 given)
Could anyone tell me what I'm doing wrong?
The code is as follows:
import clipboard
import sys
import webbrowser
import console
import urllib
mytext = (sys.argv[1])
head, sep, tail = mytext.rpartition('/')
parttwo = head.replace('https://www.evernote.com/shard/s2/sh/' '')
evernoteurl = ('evernote:///view/79211/s2/' + parttwo + '/' + parttwo + '/')
webbrowser.open('drafts://x-callback-url/create?text=' + evernoteurl + '&action=Copy%20to%20Clipboard')