| 82 |
|
# we're out of luck. |
| 83 |
|
if link_text.startswith('/'): |
| 84 |
|
link_text = page_name + link_text |
| 85 |
< |
pywikibot.stdout('Changed link_text to {} on account of "/".'.format(link_text)) |
| 85 |
> |
#pywikibot.stdout('Changed link_text to {} on account of "/".'.format(link_text)) |
| 86 |
|
|
| 87 |
|
# If this is a relative "../" link, find the parent page and set ourselves to that page, |
| 88 |
|
# then remove the relative portion of the link. Note that this is only performed once, |
| 143 |
|
|
| 144 |
|
# If we still haven't turned this match into a URL, something's gone wrong |
| 145 |
|
if (found_iw_match == False) or (iw_url == ""): |
| 146 |
< |
pywikibot.stdout('ERROR: Couldn\'t figure out link {}. Aborting script.'.format(link_text)) |
| 147 |
< |
quit() |
| 146 |
> |
pywikibot.stdout('ERROR: Couldn\'t figure out link {}.'.format(link_text)) |
| 147 |
> |
continue |
| 148 |
|
|
| 149 |
|
# Test the URL |
| 150 |
|
iw_url = iw_url.replace(' ', '_') |