diff --git a/modules/dailymotion/module.py b/modules/dailymotion/module.py index 01d9c85d546ae08248f4f02ba5751276a0af0776..116c96b168bc123028272a91642b82a56839d97f 100644 --- a/modules/dailymotion/module.py +++ b/modules/dailymotion/module.py @@ -45,7 +45,7 @@ class DailymotionModule(Module, CapVideo, CapCollection): u'380': u'380p', u'720': u'720p', u'1080': u'1080p' - }.iteritems())]) + }.items())]) format_choice = [u'm3u8', u'mp4'] diff --git a/modules/happn/module.py b/modules/happn/module.py index c81d30da621897a0faf8cd2d92d0ff4f43d21649..16d7c4052efd488b2ccfbeff8341fa14d7d89c98 100644 --- a/modules/happn/module.py +++ b/modules/happn/module.py @@ -153,7 +153,7 @@ def __init__(self, info): if 'fb' in info: self.set_profile('info', 'facebook', info['fb']['link']) self.set_profile('facebook', 'likes', 'interests', ', '.join(info['fb']['likes'])) - for name, content in info['fb']['infos'].iteritems(): + for name, content in info['fb']['infos'].items(): self.set_profile('facebook', 'infos', name, content) if info.get('twitter_id') is not None: self.set_profile('info', 'twitter', info['twitter_id']) diff --git a/modules/hds/pages.py b/modules/hds/pages.py index 225c5b134dbe7b9294ac635f18176d983f9d71e9..ddc1b541316b9ffe8a60e97027287515a3dc88fc 100644 --- a/modules/hds/pages.py +++ b/modules/hds/pages.py @@ -36,7 +36,7 @@ class Author(object): (UNKNOWN, MALE, FEMALE, - TRANSEXUAL) = xrange(4) + TRANSEXUAL) = range(4) def __init__(self, name=None): self.name = name diff --git a/modules/lacentrale/browser.py b/modules/lacentrale/browser.py index 852f039011f4912b7b577c52203977aff78ce270..ca3db4c51b5e7cb528e256b14b3562ee517656ba 100644 --- a/modules/lacentrale/browser.py +++ b/modules/lacentrale/browser.py @@ -32,7 +32,7 @@ class LaCentraleBrowser(PagesBrowser): advert_page = URL('/auto-occasion-annonce-(?P<_id>.*).html', AdvertPage) def iter_prices(self, product): - _request = '&'.join(['%s=%s' % (key, item) for key, item in product._criteria.iteritems()]) + _request = '&'.join(['%s=%s' % (key, item) for key, item in product._criteria.items()]) return self.list_page.go(_request=_request).iter_prices() def get_price(self, _id, obj): diff --git a/modules/okc/module.py b/modules/okc/module.py index 3fd1b3c6ab14538f780dc9290d1b2a305175abf8..2813c7f600cb61fb782639025afaaf48c4c24a12 100644 --- a/modules/okc/module.py +++ b/modules/okc/module.py @@ -229,7 +229,7 @@ def fill_contact(self, contact, fields): if 'profile' in fields: contact = self.get_contact(contact) if contact and 'photos' in fields: - for name, photo in contact.photos.iteritems(): + for name, photo in contact.photos.items(): if photo.url and not photo.data: data = self.browser.open(photo.url).content contact.set_photo(name, data=data) diff --git a/modules/paypal/browser.py b/modules/paypal/browser.py index da59fbe01fa8c2a5366204459b34523ec8205edb..a25fda22e5dbaf500c4f8810842e8c7f8214df76 100644 --- a/modules/paypal/browser.py +++ b/modules/paypal/browser.py @@ -142,7 +142,7 @@ def get_personal_history(self, account): 'endDate': e, } # The response is sometimes not the one we expect. - for i in xrange(3): + for i in range(3): try: self.location( 'https://www.paypal.com/myaccount/activity/filter?%s', diff --git a/modules/phpbb/browser.py b/modules/phpbb/browser.py index 9ba5b0ee70202956ffa073c0b932eef69e6d598b..27ada9278cb15bc662fbc1e9d0ceab8d6e9016f0 100644 --- a/modules/phpbb/browser.py +++ b/modules/phpbb/browser.py @@ -151,7 +151,7 @@ def post_answer(self, forum_id, topic_id, title, content): if topic_id == 0: if not forum_id: forums = self.get_forums() - forums_prompt = 'Forums list:\n%s' % ('\n'.join(['\t- %s' % f for f in forums.itervalues()])) + forums_prompt = 'Forums list:\n%s' % ('\n'.join(['\t- %s' % f for f in forums.values()])) m = re.match('\[(.*)\] (.*)', title or '') if not m: raise CantSendMessage('Please enter a title formatted like that:\n\t"[FORUM] SUBJECT"\n\n%s' % forums_prompt) diff --git a/modules/radiofrance/module.py b/modules/radiofrance/module.py index f35869e457af818a4f826a4b05901d60044fd428..74edb8cae481473fbda6bc11e8a26eee2999d566 100644 --- a/modules/radiofrance/module.py +++ b/modules/radiofrance/module.py @@ -251,7 +251,7 @@ def iter_resources(self, objs, split_path): yield Collection([split_path[0], u'podcasts'], u'Podcast') elif len(split_path) == 2 and split_path[1] == 'selection': - for _id, item in sorted(self._RADIOS.iteritems()): + for _id, item in sorted(self._RADIOS.items()): if _id == split_path[0]: if 'selection' in self._RADIOS[_id]: selection_url = self._RADIOS[_id]['selection'] @@ -376,7 +376,7 @@ def get_audio(self, _id): return item def iter_radios_search(self, pattern): - for key, radio in self._RADIOS.iteritems(): + for key, radio in self._RADIOS.items(): if pattern.lower() in radio['title'].lower() or pattern.lower() in key.lower(): yield self.get_radio(key) diff --git a/modules/radiofrance/test.py b/modules/radiofrance/test.py index a89144c60ef2334ad1bb2e90f8d44b96303e0f35..905a20a0f0d110e9e4703e8e7fbcd27a7be4dd5b 100644 --- a/modules/radiofrance/test.py +++ b/modules/radiofrance/test.py @@ -61,7 +61,7 @@ def test_ls_radios_and_selections(self): self.assertTrue(len(l_sel[0].url) > 0) def test_podcasts(self): - for key, item in self.backend._RADIOS.iteritems(): + for key, item in self.backend._RADIOS.items(): if 'podcast' in item: emissions = list(self.backend.iter_resources(objs=[BaseAudio], split_path=[key, 'podcasts'])) self.assertTrue(len(emissions) > 0)