User:AnomieBOT/source/tasks/PageCreator3.pm

package tasks::PageCreator3;

=pod

=begin metadata

Bot:      AnomieBOT II
Task:     PageCreator3
BRFA:     Wikipedia:Bots/Requests for approval/AnomieBOT II 3
Status:   Completed 2015-01-30
Created:  2015-01-18

Create redirects from [[Regional Indicator Symbol]] pairs to the corresponding flag article.

=end metadata

=cut

use utf8;
use strict;

use AnomieBOT::Task;
use Data::Dumper;
use vars qw/@ISA/;
@ISA=qw/AnomieBOT::Task/;

my $req="[[Wikipedia:Bots/Requests for approval/AnomieBOT II 3|request]]";

my %redirects = (
	'๐Ÿ‡ฆ๐Ÿ‡ฉ' => 'Flag of Andorra',
	'๐Ÿ‡ฆ๐Ÿ‡ช' => 'Flag of the United Arab Emirates',
	'๐Ÿ‡ฆ๐Ÿ‡ซ' => 'Flag of Afghanistan',
	'๐Ÿ‡ฆ๐Ÿ‡ฌ' => 'Flag of Antigua and Barbuda',
	'๐Ÿ‡ฆ๐Ÿ‡ฎ' => 'Flag of Anguilla',
	'๐Ÿ‡ฆ๐Ÿ‡ฑ' => 'Flag of Albania',
	'๐Ÿ‡ฆ๐Ÿ‡ฒ' => 'Flag of Armenia',
	'๐Ÿ‡ฆ๐Ÿ‡ด' => 'Flag of Angola',
	'๐Ÿ‡ฆ๐Ÿ‡ถ' => 'Flags of Antarctica',
	'๐Ÿ‡ฆ๐Ÿ‡ท' => 'Flag of Argentina',
	'๐Ÿ‡ฆ๐Ÿ‡ธ' => 'Flag of American Samoa',
	'๐Ÿ‡ฆ๐Ÿ‡น' => 'Flag of Austria',
	'๐Ÿ‡ฆ๐Ÿ‡บ' => 'Flag of Australia',
	'๐Ÿ‡ฆ๐Ÿ‡ผ' => 'Flag of Aruba',
	'๐Ÿ‡ฆ๐Ÿ‡ฝ' => 'Flag of ร…land',
	'๐Ÿ‡ฆ๐Ÿ‡ฟ' => 'Flag of Azerbaijan',
	'๐Ÿ‡ง๐Ÿ‡ฆ' => 'Flag of Bosnia and Herzegovina',
	'๐Ÿ‡ง๐Ÿ‡ง' => 'Flag of Barbados',
	'๐Ÿ‡ง๐Ÿ‡ฉ' => 'Flag of Bangladesh',
	'๐Ÿ‡ง๐Ÿ‡ช' => 'Flag of Belgium',
	'๐Ÿ‡ง๐Ÿ‡ซ' => 'Flag of Burkina Faso',
	'๐Ÿ‡ง๐Ÿ‡ฌ' => 'Flag of Bulgaria',
	'๐Ÿ‡ง๐Ÿ‡ญ' => 'Flag of Bahrain',
	'๐Ÿ‡ง๐Ÿ‡ฎ' => 'Flag of Burundi',
	'๐Ÿ‡ง๐Ÿ‡ฏ' => 'Flag of Benin',
	'๐Ÿ‡ง๐Ÿ‡ฑ' => 'Flag and coat of arms of Saint Barthรฉlemy',
	'๐Ÿ‡ง๐Ÿ‡ฒ' => 'Flag of Bermuda',
	'๐Ÿ‡ง๐Ÿ‡ณ' => 'Flag of Brunei',
	'๐Ÿ‡ง๐Ÿ‡ด' => 'Flag of Bolivia',
	'๐Ÿ‡ง๐Ÿ‡ถ' => 'Flag of the Netherlands',
	'๐Ÿ‡ง๐Ÿ‡ธ' => 'Flag of the Bahamas',
	'๐Ÿ‡ง๐Ÿ‡น' => 'Flag of Bhutan',
	'๐Ÿ‡ง๐Ÿ‡ป' => 'Flag of Norway',
	'๐Ÿ‡ง๐Ÿ‡ผ' => 'Flag of Botswana',
	'๐Ÿ‡ง๐Ÿ‡พ' => 'Flag of Belarus',
	'๐Ÿ‡ง๐Ÿ‡ฟ' => 'Flag of Belize',
	'๐Ÿ‡จ๐Ÿ‡ฆ' => 'Flag of Canada',
	'๐Ÿ‡จ๐Ÿ‡จ' => 'Flag of the Cocos (Keeling) Islands',
	'๐Ÿ‡จ๐Ÿ‡ฉ' => 'Flag of the Democratic Republic of the Congo',
	'๐Ÿ‡จ๐Ÿ‡ซ' => 'Flag of the Central African Republic',
	'๐Ÿ‡จ๐Ÿ‡ฌ' => 'Flag of the Republic of the Congo',
	'๐Ÿ‡จ๐Ÿ‡ญ' => 'Flag of Switzerland',
	'๐Ÿ‡จ๐Ÿ‡ฎ' => 'Flag of Ivory Coast',
	'๐Ÿ‡จ๐Ÿ‡ฐ' => 'Flag of the Cook Islands',
	'๐Ÿ‡จ๐Ÿ‡ฑ' => 'Flag of Chile',
	'๐Ÿ‡จ๐Ÿ‡ฒ' => 'Flag of Cameroon',
	'๐Ÿ‡จ๐Ÿ‡ณ' => 'Flag of China',
	'๐Ÿ‡จ๐Ÿ‡ด' => 'Flag of Colombia',
	'๐Ÿ‡จ๐Ÿ‡ท' => 'Flag of Costa Rica',
	'๐Ÿ‡จ๐Ÿ‡บ' => 'Flag of Cuba',
	'๐Ÿ‡จ๐Ÿ‡ป' => 'Flag of Cape Verde',
	'๐Ÿ‡จ๐Ÿ‡ผ' => 'Flag of Curaรงao',
	'๐Ÿ‡จ๐Ÿ‡ฝ' => 'Flag of Christmas Island',
	'๐Ÿ‡จ๐Ÿ‡พ' => 'Flag of Cyprus',
	'๐Ÿ‡จ๐Ÿ‡ฟ' => 'Flag of the Czech Republic',
	'๐Ÿ‡ฉ๐Ÿ‡ช' => 'Flag of Germany',
	'๐Ÿ‡ฉ๐Ÿ‡ฏ' => 'Flag of Djibouti',
	'๐Ÿ‡ฉ๐Ÿ‡ฐ' => 'Flag of Denmark',
	'๐Ÿ‡ฉ๐Ÿ‡ฒ' => 'Flag of Dominica',
	'๐Ÿ‡ฉ๐Ÿ‡ด' => 'Flag of the Dominican Republic',
	'๐Ÿ‡ฉ๐Ÿ‡ฟ' => 'Flag of Algeria',
	'๐Ÿ‡ช๐Ÿ‡จ' => 'Flag of Ecuador',
	'๐Ÿ‡ช๐Ÿ‡ช' => 'Flag of Estonia',
	'๐Ÿ‡ช๐Ÿ‡ฌ' => 'Flag of Egypt',
	'๐Ÿ‡ช๐Ÿ‡ญ' => 'Flag of Western Sahara',
	'๐Ÿ‡ช๐Ÿ‡ท' => 'Flag of Eritrea',
	'๐Ÿ‡ช๐Ÿ‡ธ' => 'Flag of Spain',
	'๐Ÿ‡ช๐Ÿ‡น' => 'Flag of Ethiopia',
	'๐Ÿ‡ซ๐Ÿ‡ฎ' => 'Flag of Finland',
	'๐Ÿ‡ซ๐Ÿ‡ฏ' => 'Flag of Fiji',
	'๐Ÿ‡ซ๐Ÿ‡ฐ' => 'Flag of the Falkland Islands',
	'๐Ÿ‡ซ๐Ÿ‡ฒ' => 'Flag of the Federated States of Micronesia',
	'๐Ÿ‡ซ๐Ÿ‡ด' => 'Flag of the Faroe Islands',
	'๐Ÿ‡ซ๐Ÿ‡ท' => 'Flag of France',
	'๐Ÿ‡ฌ๐Ÿ‡ฆ' => 'Flag of Gabon',
	'๐Ÿ‡ฌ๐Ÿ‡ง' => 'Flag of the United Kingdom',
	'๐Ÿ‡ฌ๐Ÿ‡ฉ' => 'Flag of Grenada',
	'๐Ÿ‡ฌ๐Ÿ‡ช' => 'Flag of Georgia (country)',
	'๐Ÿ‡ฌ๐Ÿ‡ซ' => 'Flag of French Guiana',
	'๐Ÿ‡ฌ๐Ÿ‡ฌ' => 'Flag of Guernsey',
	'๐Ÿ‡ฌ๐Ÿ‡ญ' => 'Flag of Ghana',
	'๐Ÿ‡ฌ๐Ÿ‡ฎ' => 'Flag of Gibraltar',
	'๐Ÿ‡ฌ๐Ÿ‡ฑ' => 'Flag of Greenland',
	'๐Ÿ‡ฌ๐Ÿ‡ฒ' => 'Flag of the Gambia',
	'๐Ÿ‡ฌ๐Ÿ‡ณ' => 'Flag of Guinea',
	'๐Ÿ‡ฌ๐Ÿ‡ต' => 'Flag of Guadeloupe',
	'๐Ÿ‡ฌ๐Ÿ‡ถ' => 'Flag of Equatorial Guinea',
	'๐Ÿ‡ฌ๐Ÿ‡ท' => 'Flag of Greece',
	'๐Ÿ‡ฌ๐Ÿ‡ธ' => 'Flag of South Georgia and the South Sandwich Islands',
	'๐Ÿ‡ฌ๐Ÿ‡น' => 'Flag of Guatemala',
	'๐Ÿ‡ฌ๐Ÿ‡บ' => 'Flag of Guam',
	'๐Ÿ‡ฌ๐Ÿ‡ผ' => 'Flag of Guinea-Bissau',
	'๐Ÿ‡ฌ๐Ÿ‡พ' => 'Flag of Guyana',
	'๐Ÿ‡ญ๐Ÿ‡ฐ' => 'Flag of Hong Kong',
	'๐Ÿ‡ญ๐Ÿ‡ฒ' => 'Flag of Australia',
	'๐Ÿ‡ญ๐Ÿ‡ณ' => 'Flag of Honduras',
	'๐Ÿ‡ญ๐Ÿ‡ท' => 'Flag of Croatia',
	'๐Ÿ‡ญ๐Ÿ‡น' => 'Flag of Haiti',
	'๐Ÿ‡ญ๐Ÿ‡บ' => 'Flag of Hungary',
	'๐Ÿ‡ฎ๐Ÿ‡ฉ' => 'Flag of Indonesia',
	'๐Ÿ‡ฎ๐Ÿ‡ช' => 'Flag of Ireland',
	'๐Ÿ‡ฎ๐Ÿ‡ฑ' => 'Flag of Israel',
	'๐Ÿ‡ฎ๐Ÿ‡ฒ' => 'Flag of the Isle of Man',
	'๐Ÿ‡ฎ๐Ÿ‡ณ' => 'Flag of India',
	'๐Ÿ‡ฎ๐Ÿ‡ด' => 'Flag of the British Indian Ocean Territory',
	'๐Ÿ‡ฎ๐Ÿ‡ถ' => 'Flag of Iraq',
	'๐Ÿ‡ฎ๐Ÿ‡ท' => 'Flag of Iran',
	'๐Ÿ‡ฎ๐Ÿ‡ธ' => 'Flag of Iceland',
	'๐Ÿ‡ฎ๐Ÿ‡น' => 'Flag of Italy',
	'๐Ÿ‡ฏ๐Ÿ‡ช' => 'Flag of Jersey',
	'๐Ÿ‡ฏ๐Ÿ‡ฒ' => 'Flag of Jamaica',
	'๐Ÿ‡ฏ๐Ÿ‡ด' => 'Flag of Jordan',
	'๐Ÿ‡ฏ๐Ÿ‡ต' => 'Flag of Japan',
	'๐Ÿ‡ฐ๐Ÿ‡ช' => 'Flag of Kenya',
	'๐Ÿ‡ฐ๐Ÿ‡ฌ' => 'Flag of Kyrgyzstan',
	'๐Ÿ‡ฐ๐Ÿ‡ญ' => 'Flag of Cambodia',
	'๐Ÿ‡ฐ๐Ÿ‡ฎ' => 'Flag of Kiribati',
	'๐Ÿ‡ฐ๐Ÿ‡ฒ' => 'Flag of Comoros',
	'๐Ÿ‡ฐ๐Ÿ‡ณ' => 'Flag of Saint Kitts and Nevis',
	'๐Ÿ‡ฐ๐Ÿ‡ต' => 'Flag of North Korea',
	'๐Ÿ‡ฐ๐Ÿ‡ท' => 'Flag of South Korea',
	'๐Ÿ‡ฐ๐Ÿ‡ผ' => 'Flag of Kuwait',
	'๐Ÿ‡ฐ๐Ÿ‡พ' => 'Flag of the Cayman Islands',
	'๐Ÿ‡ฐ๐Ÿ‡ฟ' => 'Flag of Kazakhstan',
	'๐Ÿ‡ฑ๐Ÿ‡ฆ' => 'Flag of Laos',
	'๐Ÿ‡ฑ๐Ÿ‡ง' => 'Flag of Lebanon',
	'๐Ÿ‡ฑ๐Ÿ‡จ' => 'Flag of Saint Lucia',
	'๐Ÿ‡ฑ๐Ÿ‡ฎ' => 'Flag of Liechtenstein',
	'๐Ÿ‡ฑ๐Ÿ‡ฐ' => 'Flag of Sri Lanka',
	'๐Ÿ‡ฑ๐Ÿ‡ท' => 'Flag of Liberia',
	'๐Ÿ‡ฑ๐Ÿ‡ธ' => 'Flag of Lesotho',
	'๐Ÿ‡ฑ๐Ÿ‡น' => 'Flag of Lithuania',
	'๐Ÿ‡ฑ๐Ÿ‡บ' => 'Flag of Luxembourg',
	'๐Ÿ‡ฑ๐Ÿ‡ป' => 'Flag of Latvia',
	'๐Ÿ‡ฑ๐Ÿ‡พ' => 'Flag of Libya',
	'๐Ÿ‡ฒ๐Ÿ‡ฆ' => 'Flag of Morocco',
	'๐Ÿ‡ฒ๐Ÿ‡จ' => 'Flag of Monaco',
	'๐Ÿ‡ฒ๐Ÿ‡ฉ' => 'Flag of Moldova',
	'๐Ÿ‡ฒ๐Ÿ‡ช' => 'Flag of Montenegro',
	'๐Ÿ‡ฒ๐Ÿ‡ซ' => 'Flag of the Collectivity of Saint Martin',
	'๐Ÿ‡ฒ๐Ÿ‡ฌ' => 'Flag of Madagascar',
	'๐Ÿ‡ฒ๐Ÿ‡ญ' => 'Flag of the Marshall Islands',
	'๐Ÿ‡ฒ๐Ÿ‡ฐ' => 'Flag of the Republic of Macedonia',
	'๐Ÿ‡ฒ๐Ÿ‡ฑ' => 'Flag of Mali',
	'๐Ÿ‡ฒ๐Ÿ‡ฒ' => 'Flag of Burma',
	'๐Ÿ‡ฒ๐Ÿ‡ณ' => 'Flag of Mongolia',
	'๐Ÿ‡ฒ๐Ÿ‡ด' => 'Flag of Macau',
	'๐Ÿ‡ฒ๐Ÿ‡ต' => 'Flag of the Northern Mariana Islands',
	'๐Ÿ‡ฒ๐Ÿ‡ถ' => 'Flag of Martinique',
	'๐Ÿ‡ฒ๐Ÿ‡ท' => 'Flag of Mauritania',
	'๐Ÿ‡ฒ๐Ÿ‡ธ' => 'Flag of Montserrat',
	'๐Ÿ‡ฒ๐Ÿ‡น' => 'Flag of Malta',
	'๐Ÿ‡ฒ๐Ÿ‡บ' => 'Flag of Mauritius',
	'๐Ÿ‡ฒ๐Ÿ‡ป' => 'Flag of the Maldives',
	'๐Ÿ‡ฒ๐Ÿ‡ผ' => 'Flag of Malawi',
	'๐Ÿ‡ฒ๐Ÿ‡ฝ' => 'Flag of Mexico',
	'๐Ÿ‡ฒ๐Ÿ‡พ' => 'Flag of Malaysia',
	'๐Ÿ‡ฒ๐Ÿ‡ฟ' => 'Flag of Mozambique',
	'๐Ÿ‡ณ๐Ÿ‡ฆ' => 'Flag of Namibia',
	'๐Ÿ‡ณ๐Ÿ‡จ' => 'Flag of New Caledonia',
	'๐Ÿ‡ณ๐Ÿ‡ช' => 'Flag of Niger',
	'๐Ÿ‡ณ๐Ÿ‡ซ' => 'Flag of Norfolk Island',
	'๐Ÿ‡ณ๐Ÿ‡ฌ' => 'Flag of Nigeria',
	'๐Ÿ‡ณ๐Ÿ‡ฎ' => 'Flag of Nicaragua',
	'๐Ÿ‡ณ๐Ÿ‡ฑ' => 'Flag of the Netherlands',
	'๐Ÿ‡ณ๐Ÿ‡ด' => 'Flag of Norway',
	'๐Ÿ‡ณ๐Ÿ‡ต' => 'Flag of Nepal',
	'๐Ÿ‡ณ๐Ÿ‡ท' => 'Flag of Nauru',
	'๐Ÿ‡ณ๐Ÿ‡บ' => 'Flag of Niue',
	'๐Ÿ‡ณ๐Ÿ‡ฟ' => 'Flag of New Zealand',
	'๐Ÿ‡ด๐Ÿ‡ฒ' => 'Flag of Oman',
	'๐Ÿ‡ต๐Ÿ‡ฆ' => 'Flag of Panama',
	'๐Ÿ‡ต๐Ÿ‡ช' => 'Flag of Peru',
	'๐Ÿ‡ต๐Ÿ‡ซ' => 'Flag of French Polynesia',
	'๐Ÿ‡ต๐Ÿ‡ฌ' => 'Flag of Papua New Guinea',
	'๐Ÿ‡ต๐Ÿ‡ญ' => 'Flag of the Philippines',
	'๐Ÿ‡ต๐Ÿ‡ฐ' => 'Flag of Pakistan',
	'๐Ÿ‡ต๐Ÿ‡ฑ' => 'Flag of Poland',
	'๐Ÿ‡ต๐Ÿ‡ฒ' => 'Flag of Saint Pierre and Miquelon',
	'๐Ÿ‡ต๐Ÿ‡ณ' => 'Flag and coat of arms of the Pitcairn Islands',
	'๐Ÿ‡ต๐Ÿ‡ท' => 'Flag of Puerto Rico',
	'๐Ÿ‡ต๐Ÿ‡ธ' => 'Palestinian flag',
	'๐Ÿ‡ต๐Ÿ‡น' => 'Flag of Portugal',
	'๐Ÿ‡ต๐Ÿ‡ผ' => 'Flag of Palau',
	'๐Ÿ‡ต๐Ÿ‡พ' => 'Flag of Paraguay',
	'๐Ÿ‡ถ๐Ÿ‡ฆ' => 'Flag of Qatar',
	'๐Ÿ‡ท๐Ÿ‡ช' => 'Flag of Rรฉunion',
	'๐Ÿ‡ท๐Ÿ‡ด' => 'Flag of Romania',
	'๐Ÿ‡ท๐Ÿ‡ธ' => 'Flag of Serbia',
	'๐Ÿ‡ท๐Ÿ‡บ' => 'Flag of Russia',
	'๐Ÿ‡ท๐Ÿ‡ผ' => 'Flag of Rwanda',
	'๐Ÿ‡ธ๐Ÿ‡ฆ' => 'Flag of Saudi Arabia',
	'๐Ÿ‡ธ๐Ÿ‡ง' => 'Flag of the Solomon Islands',
	'๐Ÿ‡ธ๐Ÿ‡จ' => 'Flag of the Seychelles',
	'๐Ÿ‡ธ๐Ÿ‡ฉ' => 'Flag of Sudan',
	'๐Ÿ‡ธ๐Ÿ‡ช' => 'Flag of Sweden',
	'๐Ÿ‡ธ๐Ÿ‡ฌ' => 'Flag of Singapore',
	'๐Ÿ‡ธ๐Ÿ‡ญ' => 'Flag of Saint Helena, Ascension and Tristan da Cunha',
	'๐Ÿ‡ธ๐Ÿ‡ฎ' => 'Flag of Slovenia',
	'๐Ÿ‡ธ๐Ÿ‡ฏ' => 'Flag of Norway',
	'๐Ÿ‡ธ๐Ÿ‡ฐ' => 'Flag of Slovakia',
	'๐Ÿ‡ธ๐Ÿ‡ฑ' => 'Flag of Sierra Leone',
	'๐Ÿ‡ธ๐Ÿ‡ฒ' => 'Flag of San Marino',
	'๐Ÿ‡ธ๐Ÿ‡ณ' => 'Flag of Senegal',
	'๐Ÿ‡ธ๐Ÿ‡ด' => 'Flag of Somalia',
	'๐Ÿ‡ธ๐Ÿ‡ท' => 'Flag of Suriname',
	'๐Ÿ‡ธ๐Ÿ‡ธ' => 'Flag of South Sudan',
	'๐Ÿ‡ธ๐Ÿ‡น' => 'Flag of Sรฃo Tomรฉ and Prรญncipe',
	'๐Ÿ‡ธ๐Ÿ‡ป' => 'Flag of El Salvador',
	'๐Ÿ‡ธ๐Ÿ‡ฝ' => 'Flag of Sint Maarten',
	'๐Ÿ‡ธ๐Ÿ‡พ' => 'Flag of Syria',
	'๐Ÿ‡ธ๐Ÿ‡ฟ' => 'Flag of Swaziland',
	'๐Ÿ‡น๐Ÿ‡จ' => 'Flag of the Turks and Caicos Islands',
	'๐Ÿ‡น๐Ÿ‡ฉ' => 'Flag of Chad',
	'๐Ÿ‡น๐Ÿ‡ซ' => 'Flags of Antarctica#Adรฉlie Land/French Southern and Antarctic Territories',
	'๐Ÿ‡น๐Ÿ‡ฌ' => 'Flag of Togo',
	'๐Ÿ‡น๐Ÿ‡ญ' => 'Flag of Thailand',
	'๐Ÿ‡น๐Ÿ‡ฏ' => 'Flag of Tajikistan',
	'๐Ÿ‡น๐Ÿ‡ฐ' => 'Flag of Tokelau',
	'๐Ÿ‡น๐Ÿ‡ฑ' => 'Flag of East Timor',
	'๐Ÿ‡น๐Ÿ‡ฒ' => 'Flag of Turkmenistan',
	'๐Ÿ‡น๐Ÿ‡ณ' => 'Flag of Tunisia',
	'๐Ÿ‡น๐Ÿ‡ด' => 'Flag of Tonga',
	'๐Ÿ‡น๐Ÿ‡ท' => 'Flag of Turkey',
	'๐Ÿ‡น๐Ÿ‡น' => 'Flag of Trinidad and Tobago',
	'๐Ÿ‡น๐Ÿ‡ป' => 'Flag of Tuvalu',
	'๐Ÿ‡น๐Ÿ‡ผ' => 'Flag of the Republic of China',
	'๐Ÿ‡น๐Ÿ‡ฟ' => 'Flag of Tanzania',
	'๐Ÿ‡บ๐Ÿ‡ฆ' => 'Flag of Ukraine',
	'๐Ÿ‡บ๐Ÿ‡ฌ' => 'Flag of Uganda',
	'๐Ÿ‡บ๐Ÿ‡ฒ' => 'Flag of the United States',
	'๐Ÿ‡บ๐Ÿ‡ธ' => 'Flag of the United States',
	'๐Ÿ‡บ๐Ÿ‡พ' => 'Flag of Uruguay',
	'๐Ÿ‡บ๐Ÿ‡ฟ' => 'Flag of Uzbekistan',
	'๐Ÿ‡ป๐Ÿ‡ฆ' => 'Flag of Vatican City',
	'๐Ÿ‡ป๐Ÿ‡จ' => 'Flag of Saint Vincent and the Grenadines',
	'๐Ÿ‡ป๐Ÿ‡ช' => 'Flag of Venezuela',
	'๐Ÿ‡ป๐Ÿ‡ฌ' => 'Flag of the British Virgin Islands',
	'๐Ÿ‡ป๐Ÿ‡ฎ' => 'Flag of the United States Virgin Islands',
	'๐Ÿ‡ป๐Ÿ‡ณ' => 'Flag of Vietnam',
	'๐Ÿ‡ป๐Ÿ‡บ' => 'Flag of Vanuatu',
	'๐Ÿ‡ผ๐Ÿ‡ซ' => 'Flag of Wallis and Futuna',
	'๐Ÿ‡ผ๐Ÿ‡ธ' => 'Flag of Samoa',
	'๐Ÿ‡พ๐Ÿ‡ช' => 'Flag of Yemen',
	'๐Ÿ‡พ๐Ÿ‡น' => 'Flag and coat of arms of Mayotte',
	'๐Ÿ‡ฟ๐Ÿ‡ฆ' => 'Flag of South Africa',
	'๐Ÿ‡ฟ๐Ÿ‡ฒ' => 'Flag of Zambia',
	'๐Ÿ‡ฟ๐Ÿ‡ผ' => 'Flag of Zimbabwe',
);

sub new {
    my $class=shift;
    my $self=$class->SUPER::new();
    bless $self, $class;
    return $self;
}

=pod

=for info
Approved 2015-01-28, completed 2015-01-30<br />[[Wikipedia:Bots/Requests for approval/AnomieBOT II 3]]

=cut

sub approved {
    return -200;
}

sub run {
    my ($self, $api)=@_;

    $api->task('PageCreator3', 0, 10, qw/d::Redirects/);

    # Spend a max of 5 minutes on this task before restarting
    my $endtime=time()+300;

    # First, resolve redirects in the targets list
    my %resolved = $api->resolve_redirects( values %redirects );
    if ( exists( $resolved{''} ) ) {
        $api->warn("Could not resolve redirects: ".$resolved{''}{'error'}."\n");
        return 60;
    }

    my ($code, $target);
    while ( ($code, $target) = each( %redirects ) ) {
        next if exists($api->store->{$code});

        $target = $api->apply_redirect_map( $target, \%resolved );
        my $res = $api->query( titles => $target );
        if ( $res->{'code'} ne 'success' ) {
            $api->warn("Failed to test existence of $target: ".$res->{'error'}."\n");
            return 60;
        }
        if ( exists( $res->{'query'}{'pages'}{'-1'} ) ) {
            $api->warn("Target page $target does not exist\n");
            next;
        }

        my $tok=$api->edittoken($code, EditRedir => 1);
        if($tok->{'code'} eq 'shutoff'){
            $api->warn("Task disabled: ".$tok->{'content'}."\n");
            return 300;
        }
        if($tok->{'code'} ne 'success'){
            $api->warn("Failed to get edit token for $code/".$tok->{'error'}."\n");
            next;
        }
        if(!exists($tok->{'missing'})){
            $api->log("$code already exists, skipping");
            $api->store->{$code}=1;
            next;
        }

        # Create page
        my $summary = "Redirecting [[Regional Indicator Symbol]] [[$code]] to [[$target]] per $req";
        my $txt = "#REDIRECT [[$target]]";
        $api->log("$summary in $code");
        my $r=$api->edit($tok, $txt, $summary, 0, 1);
        if($r->{'code'} ne 'success'){
            $api->warn("Write failed on $code: ".$r->{'error'}."\n");
            next;
        }
        $api->store->{$code}=1;

        # If we've been at it long enough, let another task have a go.
        return 0 if time()>=$endtime;
    }

    $api->log("Task may be complete!");

    return 600;
}

1;