Commit 363bd660 authored by 李康's avatar 李康

some fix

parent d3f53556
...@@ -61,7 +61,7 @@ def getAllBrands(): ...@@ -61,7 +61,7 @@ def getAllBrands():
brand = temp brand = temp
break break
res = getBrandDetail(d, brand, done) res = getBrandDetail(brand, done)
if res is not None: if res is not None:
print(delim.join(res)) print(delim.join(res))
f.write(delim.join(res) + "\n") f.write(delim.join(res) + "\n")
...@@ -74,7 +74,7 @@ def getAllBrands(): ...@@ -74,7 +74,7 @@ def getAllBrands():
d.swipe_ext("up", scale=0.2) d.swipe_ext("up", scale=0.2)
brands = d(className="android.support.v7.widget.RecyclerView").child(resourceId="org.c2h4.afei.beauty:id/tv_name") brands = d(className="android.support.v7.widget.RecyclerView").child(resourceId="org.c2h4.afei.beauty:id/tv_name")
for idx in range(1, brands.count): for idx in range(1, brands.count):
res = getBrandDetail(d, brands[idx], done) res = getBrandDetail(brands[idx], done)
if res is not None: if res is not None:
f.writelines(delim.join(res)) f.writelines(delim.join(res))
print(delim.join(res) + "\n") print(delim.join(res) + "\n")
...@@ -102,7 +102,7 @@ def getEnglishBrands(): ...@@ -102,7 +102,7 @@ def getEnglishBrands():
brand = temp brand = temp
break break
res = getBrandDetail(d, brand, done) res = getBrandDetail(brand, done)
if res is not None: if res is not None:
print(delim.join(res)) print(delim.join(res))
f.write(delim.join(res) + "\n") f.write(delim.join(res) + "\n")
...@@ -115,7 +115,7 @@ def getEnglishBrands(): ...@@ -115,7 +115,7 @@ def getEnglishBrands():
d.swipe_ext("up", scale=0.2) d.swipe_ext("up", scale=0.2)
brands = d(className="android.support.v7.widget.RecyclerView").child(resourceId="org.c2h4.afei.beauty:id/tv_name") brands = d(className="android.support.v7.widget.RecyclerView").child(resourceId="org.c2h4.afei.beauty:id/tv_name")
for idx in range(1, brands.count): for idx in range(1, brands.count):
res = getBrandDetail(d, brands[idx], done) res = getBrandDetail(brands[idx], done)
if res is not None: if res is not None:
f.writelines(delim.join(res)) f.writelines(delim.join(res))
print(delim.join(res) + "\n") print(delim.join(res) + "\n")
...@@ -125,5 +125,5 @@ def getEnglishBrands(): ...@@ -125,5 +125,5 @@ def getEnglishBrands():
f.close() f.close()
if __name__=='__main__': if __name__=='__main__':
getAllBrands() # getAllBrands()
getEnglishBrands() getEnglishBrands()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment