File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 77import time
88import urllib
99import requests
10+ import re
1011
1112from bs4 import BeautifulSoup
1213from . import exceptions
@@ -437,20 +438,19 @@ def _update_app_version(self):
437438 if self ._raw :
438439 print ("--- auto detecting latest app version" )
439440 try :
440- response = requests .get (constants .APPBRAIN_URL )
441- responseContent = response .content
442- soup = BeautifulSoup (responseContent , "html.parser" )
443- meta_tag = soup .find ("meta" , itemprop = "softwareVersion" )
444- if meta_tag is not None :
445- version = meta_tag ['content' ]
441+ response = requests .get ("https://play.google.com/store/apps/details?id=com.panasonic.ACCsmart" )
442+ responseText = response .content .decode ("utf-8" )
443+ version_match = re .search (r'\[\"(\d+\.\d+\.\d+)\"\]' , responseText )
444+ if version_match :
445+ version = version_match .group (1 )
446446 self ._app_version = version
447447 if self ._raw :
448448 print ("--- found version: {}" .format (self ._app_version ))
449449 return
450450 else :
451451 self ._app_version = constants .X_APP_VERSION
452452 if self ._raw :
453- print ("--- Error finding meta_tag " )
453+ print ("--- error finding version " )
454454 return
455455
456456 except Exception :
You can’t perform that action at this time.
0 commit comments