Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Awesome Pokemon Map #364

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions monocle/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@
if all((conf.TWITTER_CONSUMER_KEY, conf.TWITTER_CONSUMER_SECRET,
conf.TWITTER_ACCESS_KEY, conf.TWITTER_ACCESS_SECRET)):
try:
import peony.utils
def _get_image_metadata(file_):
return 'image/png', 'tweet_image', True, file_
peony.utils.get_image_metadata = _get_image_metadata
from peony import PeonyClient
except ImportError as e:
raise ImportError("You specified a TWITTER_ACCESS_KEY but you don't have peony-twitter installed.") from e
Expand Down Expand Up @@ -514,7 +510,8 @@ async def tweet(self):
try:
media = await client.upload_media(image,
media_type='image/png',
media_category='tweet_image')
media_category='tweet_image',
chunked=True)
media_id = media['media_id']
except Exception:
self.log.exception('Failed to upload Tweet image.')
Expand Down
2 changes: 1 addition & 1 deletion monocle/static/monocle-icons
Submodule monocle-icons updated 755 files
8 changes: 6 additions & 2 deletions monocle/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ def get_device_info(account):
def generate_device_info(account):
ios8 = ('8.0', '8.0.1', '8.0.2', '8.1', '8.1.1', '8.1.2', '8.1.3', '8.2', '8.3', '8.4', '8.4.1')
ios9 = ('9.0', '9.0.1', '9.0.2', '9.1', '9.2', '9.2.1', '9.3', '9.3.1', '9.3.2', '9.3.3', '9.3.4', '9.3.5')
ios10 = ('10.0', '10.0.1', '10.0.2', '10.0.3', '10.1', '10.1.1', '10.2', '10.2.1', '10.3', '10.3.1', '10.3.2')
# 10.0 was only for iPhone 7 and 7 Plus, and is rare
ios10 = ('10.0.1', '10.0.2', '10.0.3', '10.1', '10.1.1', '10.2', '10.2.1', '10.3', '10.3.1', '10.3.2', '10.3.3')

devices = tuple(IPHONES.keys())
account['model'] = choice(devices)
Expand All @@ -158,8 +159,11 @@ def generate_device_info(account):
if account['model'] in ('iPhone9,1', 'iPhone9,2',
'iPhone9,3', 'iPhone9,4'):
account['iOS'] = choice(ios10)
elif account['model'] in ('iPhone8,1', 'iPhone8,2', 'iPhone8,4'):
elif account['model'] in ('iPhone8,1', 'iPhone8,2'):
account['iOS'] = choice(ios9 + ios10)
elif account['model'] == 'iPhone8,4':
# iPhone SE started on 9.3
account['iOS'] = choice(('9.3', '9.3.1', '9.3.2', '9.3.3', '9.3.4', '9.3.5') + ios10)
else:
account['iOS'] = choice(ios8 + ios9 + ios10)

Expand Down
6 changes: 3 additions & 3 deletions monocle/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async def login(self, reauth=False):
raise err

self.error_code = '°'
version = 6701
version = 6900
async with self.sim_semaphore:
self.error_code = 'APP SIMULATION'
if conf.APP_SIMULATION:
Expand Down Expand Up @@ -596,9 +596,9 @@ async def call(self, request, chain=True, stamp=True, buddy=True, settings=False
else:
if (not dl_hash
and conf.FORCED_KILL
and dl_settings.settings.minimum_client_version != '0.67.1'):
and dl_settings.settings.minimum_client_version != '0.69.0'):
forced_version = StrictVersion(dl_settings.settings.minimum_client_version)
if forced_version > StrictVersion('0.67.1'):
if forced_version > StrictVersion('0.69.0'):
err = '{} is being forced, exiting.'.format(forced_version)
self.log.error(err)
print(err)
Expand Down
2 changes: 1 addition & 1 deletion solve_captchas.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class AccountManager(BaseManager): pass

await sleep(.6)

request.download_remote_config_version(platform=1, app_version=6701)
request.download_remote_config_version(platform=1, app_version=6900)
request.check_challenge()
request.get_hatched_eggs()
request.get_inventory(last_timestamp_ms=account.get('inventory_timestamp', 0))
Expand Down