From 3b5a8b569c9729f687182897a405c2872e7fc7b0 Mon Sep 17 00:00:00 2001 From: "miss.mary" Date: Thu, 22 Jul 2021 19:04:23 +0430 Subject: [PATCH] GSMarena crawler --- .gitignore | 145 ++++++++++++++++++++++ Specifications.py | 67 ++++++++++ config.py | 3 + image/xiaomi-image.json | 1 + image/xiaomi_relative.json | 1 + img/Xiaomi Black Shark 4 Pro.json | 1 + img/Xiaomi Black Shark 4.json | 1 + img/Xiaomi Mi 10S.json | 1 + img/Xiaomi Mi 10i 5G.json | 1 + img/Xiaomi Mi 11 Lite 5G.json | 1 + img/Xiaomi Mi 11 Lite.json | 1 + img/Xiaomi Mi 11 Pro.json | 1 + img/Xiaomi Mi 11 Ultra.json | 1 + img/Xiaomi Mi 11.json | 1 + img/Xiaomi Mi 11X.json | 1 + img/Xiaomi Mi 11i.json | 1 + img/Xiaomi Mi Mix Fold.json | 1 + img/Xiaomi Mi Watch Lite.json | 1 + img/Xiaomi Mi Watch Revolve Active.json | 1 + img/Xiaomi Poco F3.json | 1 + img/Xiaomi Poco M2 Reloaded.json | 1 + img/Xiaomi Poco M3 Pro 5G.json | 1 + img/Xiaomi Poco M3.json | 1 + img/Xiaomi Poco X3 Pro.json | 1 + img/Xiaomi Redmi 9 Power.json | 1 + img/Xiaomi Redmi 9T.json | 1 + img/Xiaomi Redmi K40 Gaming.json | 1 + img/Xiaomi Redmi K40 Pro+.json | 1 + img/Xiaomi Redmi K40 Pro.json | 1 + img/Xiaomi Redmi K40.json | 1 + img/Xiaomi Redmi Note 10 5G.json | 1 + img/Xiaomi Redmi Note 10 Pro (China).json | 1 + img/Xiaomi Redmi Note 10 Pro (India).json | 1 + img/Xiaomi Redmi Note 10 Pro Max.json | 1 + img/Xiaomi Redmi Note 10 Pro.json | 1 + img/Xiaomi Redmi Note 10.json | 1 + img/Xiaomi Redmi Note 10S.json | 1 + img/Xiaomi Redmi Note 10T 5G.json | 1 + img/Xiaomi Redmi Note 8 2021.json | 1 + img/Xiaomi Redmi Note 9 4G.json | 1 + img/Xiaomi Redmi Note 9 5G.json | 1 + img/Xiaomi Redmi Note 9 Pro 5G.json | 1 + img/Xiaomi Redmi Note 9T.json | 1 + img/Xiaomi Redmi Watch.json | 1 + link/apple.json | 1 + link/samsung.json | 1 + link/xiaomi.json | 1 + links.py | 45 +++++++ main.py | 20 +++ mongo.py | 15 +++ pictures.py | 62 +++++++++ request.py | 15 +++ 52 files changed, 416 insertions(+) create mode 100644 .gitignore create mode 100644 Specifications.py create mode 100644 config.py create mode 100644 image/xiaomi-image.json create mode 100644 image/xiaomi_relative.json create mode 100644 img/Xiaomi Black Shark 4 Pro.json create mode 100644 img/Xiaomi Black Shark 4.json create mode 100644 img/Xiaomi Mi 10S.json create mode 100644 img/Xiaomi Mi 10i 5G.json create mode 100644 img/Xiaomi Mi 11 Lite 5G.json create mode 100644 img/Xiaomi Mi 11 Lite.json create mode 100644 img/Xiaomi Mi 11 Pro.json create mode 100644 img/Xiaomi Mi 11 Ultra.json create mode 100644 img/Xiaomi Mi 11.json create mode 100644 img/Xiaomi Mi 11X.json create mode 100644 img/Xiaomi Mi 11i.json create mode 100644 img/Xiaomi Mi Mix Fold.json create mode 100644 img/Xiaomi Mi Watch Lite.json create mode 100644 img/Xiaomi Mi Watch Revolve Active.json create mode 100644 img/Xiaomi Poco F3.json create mode 100644 img/Xiaomi Poco M2 Reloaded.json create mode 100644 img/Xiaomi Poco M3 Pro 5G.json create mode 100644 img/Xiaomi Poco M3.json create mode 100644 img/Xiaomi Poco X3 Pro.json create mode 100644 img/Xiaomi Redmi 9 Power.json create mode 100644 img/Xiaomi Redmi 9T.json create mode 100644 img/Xiaomi Redmi K40 Gaming.json create mode 100644 img/Xiaomi Redmi K40 Pro+.json create mode 100644 img/Xiaomi Redmi K40 Pro.json create mode 100644 img/Xiaomi Redmi K40.json create mode 100644 img/Xiaomi Redmi Note 10 5G.json create mode 100644 img/Xiaomi Redmi Note 10 Pro (China).json create mode 100644 img/Xiaomi Redmi Note 10 Pro (India).json create mode 100644 img/Xiaomi Redmi Note 10 Pro Max.json create mode 100644 img/Xiaomi Redmi Note 10 Pro.json create mode 100644 img/Xiaomi Redmi Note 10.json create mode 100644 img/Xiaomi Redmi Note 10S.json create mode 100644 img/Xiaomi Redmi Note 10T 5G.json create mode 100644 img/Xiaomi Redmi Note 8 2021.json create mode 100644 img/Xiaomi Redmi Note 9 4G.json create mode 100644 img/Xiaomi Redmi Note 9 5G.json create mode 100644 img/Xiaomi Redmi Note 9 Pro 5G.json create mode 100644 img/Xiaomi Redmi Note 9T.json create mode 100644 img/Xiaomi Redmi Watch.json create mode 100644 link/apple.json create mode 100644 link/samsung.json create mode 100644 link/xiaomi.json create mode 100644 links.py create mode 100644 main.py create mode 100644 mongo.py create mode 100644 pictures.py create mode 100644 request.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..679e3eb --- /dev/null +++ b/.gitignore @@ -0,0 +1,145 @@ +.idea +# Created by https://www.toptal.com/developers/gitignore/api/python +# Edit at https://www.toptal.com/developers/gitignore?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# End of https://www.toptal.com/developers/gitignore/api/python \ No newline at end of file diff --git a/Specifications.py b/Specifications.py new file mode 100644 index 0000000..4b40e3f --- /dev/null +++ b/Specifications.py @@ -0,0 +1,67 @@ +import json +from request import Request +from mongo import MongoDB + + +class Specifications: + """" + get specification of each mobile + """ + @staticmethod + def get_specifications(): + mongo = MongoDB() + database = mongo.database + + images = [] + + # you have to open the file of each brand for get their mobile specification + with open('link/samsung.json', 'r') as s: + link = json.loads(s.read()) + + for li in link: + + document = {} + tables = {} + features = {} + url = f"https://www.gsmarena.com/{li}" + + response = (Request.request(url)) + phone_name = response.find('h1').text + if '.' in phone_name: + phone_name = ''.join(phone_name.split('.')) + + print(phone_name) + + image = response.find('div', {'class': 'specs-photo-main'}) + photo_link = (image.find('img').get('src')) + images.append(photo_link) + print(photo_link) + + find_div = response.find('div', {'id': 'specs-list'}) + find_table = find_div.findAll('table') + + for table in find_table: + + table_name = table.find('th', {'scope': 'row'}).text + for tr in table.find_all('tr'): + td_ttl = getattr(tr.find('td', {'class': 'ttl'}), 'text', None) + + if td_ttl is None: + td_ttl = 'sample' + + elif '.' in td_ttl: + td_ttl = ''.join(td_ttl.split('.')) + + td_nfo = getattr(tr.find('td', {'class': 'nfo'}), 'text', None) + features.update({td_ttl: td_nfo}) + + tables.update({table_name: features}) + features = {} + document.update({'phone': phone_name}) + document.update({'features': tables}) + print(document) + collections = database['samsung1'] + collections.insert_one(document) + # this file is for images of main page of each mobile + with open('image/samsung-image.json', 'w') as s: + s.write(json.dumps(images)) diff --git a/config.py b/config.py new file mode 100644 index 0000000..c65c2ba --- /dev/null +++ b/config.py @@ -0,0 +1,3 @@ +from proxycrawl import CrawlingAPI + +api = CrawlingAPI({'token': 'PvpdLZO_scAyqozr_GeYyQ'}) # this key is for me you have to sign up and get your key diff --git a/image/xiaomi-image.json b/image/xiaomi-image.json new file mode 100644 index 0000000..e77f20c --- /dev/null +++ b/image/xiaomi-image.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note-10t-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-watch-revolve-active.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note-10-pro-china-new.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note8-2021.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-poco-m3-pro-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-k40-gaming.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi11x-pro.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi11x.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-poco-m2-reloaded.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-mix-fold.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi11-ultra-5g-k1.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-11-pro-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-11i-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-11-lite-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-11-lite-4g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-black-shark-4-pro.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-black-shark-4.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-poco-x3-pro-.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-poco-f3.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-10s.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note10-pro.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note10-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note10s.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note10--.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note10-pro-india.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note10-pro-india.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-k40-pro-plus.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-k40-pro.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-k40.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note-9t-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-9-power.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi-10i-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-mi11.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-9-power.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-watch.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note9-pro.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note-9-5g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-note9-4g.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-redmi-watch.jpg", "https://fdn2.gsmarena.com/vv/bigpic/xiaomi-poco-m3-.jpg"] \ No newline at end of file diff --git a/image/xiaomi_relative.json b/image/xiaomi_relative.json new file mode 100644 index 0000000..0caa48b --- /dev/null +++ b/image/xiaomi_relative.json @@ -0,0 +1 @@ +["xiaomi_redmi_note_10t_5g-pictures-11008.php", "xiaomi_mi_watch_revolve_active-pictures-10977.php", "xiaomi_redmi_note_10_pro_(china)-pictures-10930.php", "xiaomi_redmi_note_8_2021-pictures-10919.php", "xiaomi_poco_m3_pro_5g-pictures-10857.php", "xiaomi_redmi_k40_gaming-pictures-10880.php", "xiaomi_mi_11x_pro-pictures-10776.php", "xiaomi_mi_11x-pictures-10775.php", "xiaomi_poco_m2_reloaded-pictures-10867.php", "xiaomi_mi_mix_fold-pictures-10817.php", "xiaomi_mi_11_ultra-pictures-10737.php", "xiaomi_mi_11_pro-pictures-10816.php", "xiaomi_mi_11i-pictures-10777.php", "xiaomi_mi_11_lite_5g-pictures-10815.php", "xiaomi_mi_11_lite-pictures-10665.php", "xiaomi_black_shark_4_pro-pictures-10805.php", "xiaomi_black_shark_4-pictures-10714.php", "xiaomi_poco_x3_pro-pictures-10802.php", "xiaomi_poco_f3-pictures-10758.php", "xiaomi_mi_10s-pictures-10780.php", "xiaomi_redmi_note_10_pro-pictures-10662.php", "xiaomi_redmi_note_10_5g-pictures-10768.php", "xiaomi_redmi_note_10s-pictures-10769.php", "xiaomi_redmi_note_10-pictures-10247.php", "xiaomi_redmi_note_10_pro_max-pictures-10770.php", "xiaomi_redmi_note_10_pro_(india)-pictures-10771.php", "xiaomi_redmi_k40_pro+-pictures-10752.php", "xiaomi_redmi_k40_pro-pictures-10727.php", "xiaomi_redmi_k40-pictures-10728.php", "xiaomi_redmi_note_9t-pictures-10661.php", "xiaomi_redmi_9t-pictures-10670.php", "xiaomi_mi_10i_5g-pictures-10615.php", "xiaomi_mi_11-pictures-10656.php", "xiaomi_redmi_9_power-pictures-10616.php", "xiaomi_mi_watch_lite-pictures-10633.php", "xiaomi_redmi_note_9_pro_5g-pictures-10582.php", "xiaomi_redmi_note_9_5g-pictures-10581.php", "xiaomi_redmi_note_9_4g-pictures-10609.php", "xiaomi_redmi_watch-pictures-10610.php", "xiaomi_poco_m3-pictures-10599.php"] \ No newline at end of file diff --git a/img/Xiaomi Black Shark 4 Pro.json b/img/Xiaomi Black Shark 4 Pro.json new file mode 100644 index 0000000..a5b8515 --- /dev/null +++ b/img/Xiaomi Black Shark 4 Pro.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-black-shark-4-pro-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-black-shark-4-pro-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Black Shark 4.json b/img/Xiaomi Black Shark 4.json new file mode 100644 index 0000000..e73fc79 --- /dev/null +++ b/img/Xiaomi Black Shark 4.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-black-shark-4-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-black-shark-4-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-black-shark-4/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-black-shark-4/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Mi 10S.json b/img/Xiaomi Mi 10S.json new file mode 100644 index 0000000..97858b4 --- /dev/null +++ b/img/Xiaomi Mi 10S.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-10s-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-10s-1.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Mi 10i 5G.json b/img/Xiaomi Mi 10i 5G.json new file mode 100644 index 0000000..22e9728 --- /dev/null +++ b/img/Xiaomi Mi 10i 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-10i-5g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-10i-5g-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Mi 11 Lite 5G.json b/img/Xiaomi Mi 11 Lite 5G.json new file mode 100644 index 0000000..6f95345 --- /dev/null +++ b/img/Xiaomi Mi 11 Lite 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-lite-5g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-lite-5g-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11-lite-5g/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11-lite-5g/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Mi 11 Lite.json b/img/Xiaomi Mi 11 Lite.json new file mode 100644 index 0000000..2e060a9 --- /dev/null +++ b/img/Xiaomi Mi 11 Lite.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-lite-4g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-lite-4g-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11-lite/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11-lite/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Mi 11 Pro.json b/img/Xiaomi Mi 11 Pro.json new file mode 100644 index 0000000..7b1bb3d --- /dev/null +++ b/img/Xiaomi Mi 11 Pro.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-pro-5g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-pro-5g-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Mi 11 Ultra.json b/img/Xiaomi Mi 11 Ultra.json new file mode 100644 index 0000000..72cd038 --- /dev/null +++ b/img/Xiaomi Mi 11 Ultra.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi11-ultra-5g-k1-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi11-ultra-5g-k1-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11-ultra/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11-ultra/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Mi 11.json b/img/Xiaomi Mi 11.json new file mode 100644 index 0000000..83e8742 --- /dev/null +++ b/img/Xiaomi Mi 11.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi11-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi11-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Mi 11X.json b/img/Xiaomi Mi 11X.json new file mode 100644 index 0000000..1a2687a --- /dev/null +++ b/img/Xiaomi Mi 11X.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi11x-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi11x-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Mi 11i.json b/img/Xiaomi Mi 11i.json new file mode 100644 index 0000000..f04b3fa --- /dev/null +++ b/img/Xiaomi Mi 11i.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-i-5g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-11-i-5g-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11i/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-mi-11i/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Mi Mix Fold.json b/img/Xiaomi Mi Mix Fold.json new file mode 100644 index 0000000..19313e2 --- /dev/null +++ b/img/Xiaomi Mi Mix Fold.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-mix-fold-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-mix-fold-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-mix-fold-3.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-mix-fold-4.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Mi Watch Lite.json b/img/Xiaomi Mi Watch Lite.json new file mode 100644 index 0000000..57a4845 --- /dev/null +++ b/img/Xiaomi Mi Watch Lite.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-watch-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-watch-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Mi Watch Revolve Active.json b/img/Xiaomi Mi Watch Revolve Active.json new file mode 100644 index 0000000..0510952 --- /dev/null +++ b/img/Xiaomi Mi Watch Revolve Active.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-watch-revolve-active-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-mi-watch-revolve-active-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Poco F3.json b/img/Xiaomi Poco F3.json new file mode 100644 index 0000000..bb06f4e --- /dev/null +++ b/img/Xiaomi Poco F3.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-f3-1.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-f3/lifestyle/-1024w2/gsmarena_010.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-f3/lifestyle/-1024w2/gsmarena_011.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-f3/lifestyle/-1024w2/gsmarena_012.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Poco M2 Reloaded.json b/img/Xiaomi Poco M2 Reloaded.json new file mode 100644 index 0000000..ef5ef1a --- /dev/null +++ b/img/Xiaomi Poco M2 Reloaded.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m2-reloaded-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m2-reloaded-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Poco M3 Pro 5G.json b/img/Xiaomi Poco M3 Pro 5G.json new file mode 100644 index 0000000..649f36a --- /dev/null +++ b/img/Xiaomi Poco M3 Pro 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m3-pro-5g-3.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m3-pro-5g-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-m3-pro-5g/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-m3-pro-5g/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Poco M3.json b/img/Xiaomi Poco M3.json new file mode 100644 index 0000000..e378780 --- /dev/null +++ b/img/Xiaomi Poco M3.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m3-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m3-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m3-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-m3-3.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Poco X3 Pro.json b/img/Xiaomi Poco X3 Pro.json new file mode 100644 index 0000000..37c226e --- /dev/null +++ b/img/Xiaomi Poco X3 Pro.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-poco-x3-pro-1.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-x3-pro/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-x3-pro/lifestyle/-1024w2/gsmarena_002.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/poco-x3-pro/lifestyle/-1024w2/gsmarena_003.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Redmi 9 Power.json b/img/Xiaomi Redmi 9 Power.json new file mode 100644 index 0000000..17d328d --- /dev/null +++ b/img/Xiaomi Redmi 9 Power.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-9-power-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-9-power-3.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi 9T.json b/img/Xiaomi Redmi 9T.json new file mode 100644 index 0000000..fd26c52 --- /dev/null +++ b/img/Xiaomi Redmi 9T.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-9-power-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-9t-3.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-9t-4.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-redmi-9t/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Redmi K40 Gaming.json b/img/Xiaomi Redmi K40 Gaming.json new file mode 100644 index 0000000..37e0f5f --- /dev/null +++ b/img/Xiaomi Redmi K40 Gaming.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-gaming-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-gaming-bruce-lee.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-gaming-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi K40 Pro+.json b/img/Xiaomi Redmi K40 Pro+.json new file mode 100644 index 0000000..442f688 --- /dev/null +++ b/img/Xiaomi Redmi K40 Pro+.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-pro-plus-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-pro-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi K40 Pro.json b/img/Xiaomi Redmi K40 Pro.json new file mode 100644 index 0000000..19c9103 --- /dev/null +++ b/img/Xiaomi Redmi K40 Pro.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-pro-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-pro-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi K40.json b/img/Xiaomi Redmi K40.json new file mode 100644 index 0000000..2599a87 --- /dev/null +++ b/img/Xiaomi Redmi K40.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-k40-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-k40-pro-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10 5G.json b/img/Xiaomi Redmi Note 10 5G.json new file mode 100644 index 0000000..b96cbe0 --- /dev/null +++ b/img/Xiaomi Redmi Note 10 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-5g-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-5g-2.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-redmi-note-10-5g/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-redmi-note-10-5g/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10 Pro (China).json b/img/Xiaomi Redmi Note 10 Pro (China).json new file mode 100644 index 0000000..390d5ac --- /dev/null +++ b/img/Xiaomi Redmi Note 10 Pro (China).json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-10-pro-china-1.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10 Pro (India).json b/img/Xiaomi Redmi Note 10 Pro (India).json new file mode 100644 index 0000000..be30571 --- /dev/null +++ b/img/Xiaomi Redmi Note 10 Pro (India).json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-pro-india-10.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10 Pro Max.json b/img/Xiaomi Redmi Note 10 Pro Max.json new file mode 100644 index 0000000..be30571 --- /dev/null +++ b/img/Xiaomi Redmi Note 10 Pro Max.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-pro-india-10.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10 Pro.json b/img/Xiaomi Redmi Note 10 Pro.json new file mode 100644 index 0000000..df21ab1 --- /dev/null +++ b/img/Xiaomi Redmi Note 10 Pro.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-pro-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-pro-4.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-pro-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-pro-3.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10.json b/img/Xiaomi Redmi Note 10.json new file mode 100644 index 0000000..f755c95 --- /dev/null +++ b/img/Xiaomi Redmi Note 10.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10-11.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-redmi-note-10/lifestyle/-1024w2/gsmarena_001.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-redmi-note-10/lifestyle/-1024w2/gsmarena_002.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10S.json b/img/Xiaomi Redmi Note 10S.json new file mode 100644 index 0000000..1dae5ad --- /dev/null +++ b/img/Xiaomi Redmi Note 10S.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10s-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10s-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note10s-3.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 10T 5G.json b/img/Xiaomi Redmi Note 10T 5G.json new file mode 100644 index 0000000..50c55a8 --- /dev/null +++ b/img/Xiaomi Redmi Note 10T 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-10t-5g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-10t-5g-2.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 8 2021.json b/img/Xiaomi Redmi Note 8 2021.json new file mode 100644 index 0000000..b4bbba1 --- /dev/null +++ b/img/Xiaomi Redmi Note 8 2021.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note8-2021-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note8-2021-1.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 9 4G.json b/img/Xiaomi Redmi Note 9 4G.json new file mode 100644 index 0000000..b1aa6dc --- /dev/null +++ b/img/Xiaomi Redmi Note 9 4G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note9-4g-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note9-4g-1.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 9 5G.json b/img/Xiaomi Redmi Note 9 5G.json new file mode 100644 index 0000000..aba80e6 --- /dev/null +++ b/img/Xiaomi Redmi Note 9 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-9-5g-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-9-5g-1.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 9 Pro 5G.json b/img/Xiaomi Redmi Note 9 Pro 5G.json new file mode 100644 index 0000000..5660a2d --- /dev/null +++ b/img/Xiaomi Redmi Note 9 Pro 5G.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note9-pro-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note9-pro-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note9-pro-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note9-pro-3.jpg"] \ No newline at end of file diff --git a/img/Xiaomi Redmi Note 9T.json b/img/Xiaomi Redmi Note 9T.json new file mode 100644 index 0000000..b7ff572 --- /dev/null +++ b/img/Xiaomi Redmi Note 9T.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-9t-5g-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-9t-5g-2.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-note-9t-5g-3.jpg", "https://fdn.gsmarena.com/imgroot/reviews/21/xiaomi-redmi-note-9t/lifestyle/-1024w2/gsmarena_001.jpg", null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null] \ No newline at end of file diff --git a/img/Xiaomi Redmi Watch.json b/img/Xiaomi Redmi Watch.json new file mode 100644 index 0000000..2d8bc4f --- /dev/null +++ b/img/Xiaomi Redmi Watch.json @@ -0,0 +1 @@ +["https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-watch-1.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-watch-0.jpg", "https://fdn2.gsmarena.com/vv/pics/xiaomi/xiaomi-redmi-watch-2.jpg"] \ No newline at end of file diff --git a/link/apple.json b/link/apple.json new file mode 100644 index 0000000..616b768 --- /dev/null +++ b/link/apple.json @@ -0,0 +1 @@ +["apple_ipad_pro_12_9_(2021)-10864.php", "apple_ipad_pro_11_(2021)-10865.php", "apple_iphone_12_pro_max-10237.php", "apple_iphone_12_pro-10508.php", "apple_iphone_12-10509.php", "apple_iphone_12_mini-10510.php", "apple_ipad_air_(2020)-10444.php", "apple_ipad_10_2_(2020)-10445.php", "apple_watch_se-10446.php", "apple_watch_series_6_aluminum-10447.php", "apple_watch_series_6-10448.php", "apple_watch_edition_series_6-10449.php", "apple_iphone_se_(2020)-10170.php", "apple_ipad_pro_12_9_(2020)-10136.php", "apple_ipad_pro_11_(2020)-10137.php", "apple_iphone_11_pro_max-9846.php", "apple_iphone_11_pro-9847.php", "apple_iphone_11-9848.php", "apple_ipad_10_2_(2019)-9857.php", "apple_watch_edition_series_5-9860.php", "apple_watch_series_5-9859.php", "apple_watch_series_5_aluminum-9858.php", "apple_ipad_air_(2019)-9638.php", "apple_ipad_mini_(2019)-9637.php", "apple_ipad_pro_12_9_(2018)-9387.php", "apple_ipad_pro_11_(2018)-9386.php", "apple_iphone_xs_max-9319.php", "apple_iphone_xs-9318.php", "apple_iphone_xr-9320.php", "apple_watch_series_4-9321.php", "apple_watch_series_4_aluminum-9322.php", "apple_ipad_9_7_(2018)-9142.php", "apple_iphone_x-8858.php", "apple_iphone_8_plus-8131.php", "apple_iphone_8-8573.php", "apple_watch_edition_series_3-8861.php", "apple_watch_series_3-8860.php", "apple_watch_series_3_aluminum-8859.php", "apple_ipad_pro_12_9_(2017)-8717.php", "apple_ipad_pro_10_5_(2017)-8716.php"] \ No newline at end of file diff --git a/link/samsung.json b/link/samsung.json new file mode 100644 index 0000000..dbc2476 --- /dev/null +++ b/link/samsung.json @@ -0,0 +1 @@ +["samsung_galaxy_m21_2021-11015.php", "samsung_galaxy_f22-10996.php", "samsung_galaxy_m32-10887.php", "samsung_galaxy_a22_5g-10873.php", "samsung_galaxy_a22-10948.php", "samsung_galaxy_tab_a7_lite-10933.php", "samsung_galaxy_tab_s7_fe-10922.php", "samsung_galaxy_f52_5g-10900.php", "samsung_galaxy_m42_5g-10848.php", "samsung_galaxy_m12-10860.php", "samsung_galaxy_quantum_2-10850.php", "samsung_galaxy_f12-10825.php", "samsung_galaxy_f02s-10824.php", "samsung_galaxy_a72-10469.php", "samsung_galaxy_a52_5g-10631.php", "samsung_galaxy_a52-10641.php", "samsung_galaxy_xcover_5-10718.php", "samsung_galaxy_a32-10753.php", "samsung_galaxy_m62-10749.php", "samsung_galaxy_f62-10740.php", "samsung_galaxy_m12_(india)-10578.php", "samsung_galaxy_s21_ultra_5g-10596.php", "samsung_galaxy_s21+_5g-10625.php", "samsung_galaxy_s21_5g-10626.php", "samsung_galaxy_a32_5g-10648.php", "samsung_galaxy_m02s-10663.php", "samsung_galaxy_a12-10604.php", "samsung_galaxy_m02-10709.php", "samsung_galaxy_a02-10708.php", "samsung_galaxy_a02s-10603.php", "samsung_galaxy_m21s-10580.php", "samsung_galaxy_m31_prime-10496.php", "samsung_galaxy_f41-10498.php", "samsung_galaxy_tab_active3-10476.php", "samsung_galaxy_s20_fe_5g-10377.php", "samsung_galaxy_s20_fe-10428.php", "samsung_galaxy_a42_5g-10412.php", "samsung_galaxy_tab_a7_10_4_(2020)-10411.php", "samsung_galaxy_m51-10148.php", "samsung_galaxy_a51_5g_uw-10371.php", "samsung_galaxy_z_fold2_5g-10342.php", "samsung_galaxy_note20_ultra_5g-10261.php", "samsung_galaxy_note20_ultra-10355.php", "samsung_galaxy_note20_5g-10325.php", "samsung_galaxy_note20-10338.php", "samsung_galaxy_watch3-10315.php", "samsung_galaxy_tab_s7+-10336.php", "samsung_galaxy_tab_s7-10337.php", "samsung_galaxy_z_flip_5g-10244.php", "samsung_galaxy_m31s-10333.php", "samsung_galaxy_m01s-10335.php", "samsung_galaxy_m01_core-10316.php", "samsung_galaxy_a01_core-10314.php", "samsung_galaxy_a71_5g_uw-10276.php", "samsung_galaxy_m01-10216.php", "samsung_galaxy_a21s-10239.php", "samsung_galaxy_j2_core_(2020)-10208.php", "samsung_galaxy_a_quantum-10243.php", "samsung_galaxy_a71_5g-10146.php", "samsung_galaxy_a51_5g-10157.php", "samsung_galaxy_a21-10172.php", "samsung_galaxy_tab_a_8_4_(2020)-10483.php", "samsung_galaxy_tab_s6_lite-10158.php", "samsung_galaxy_m11-10124.php", "samsung_galaxy_a31-10149.php", "samsung_galaxy_a41-10138.php", "samsung_galaxy_m21-10111.php", "samsung_galaxy_a11-10132.php", "samsung_galaxy_m31-10079.php", "samsung_galaxy_s20_ultra_5g-10040.php", "samsung_galaxy_s20_ultra-10084.php", "samsung_galaxy_s20+_5g-10041.php", "samsung_galaxy_s20+-10080.php", "samsung_galaxy_s20_5g_uw-10254.php", "samsung_galaxy_s20_5g-10044.php", "samsung_galaxy_s20-10081.php", "samsung_galaxy_z_flip-10054.php", "samsung_galaxy_tab_s6_5g-10004.php", "samsung_galaxy_xcover_pro-10001.php", "samsung_galaxy_note10_lite-10003.php", "samsung_galaxy_s10_lite-9917.php", "samsung_galaxy_a01-9999.php", "samsung_galaxy_a71-9995.php", "samsung_galaxy_a51-9963.php", "samsung_galaxy_xcover_fieldpro-9937.php"] \ No newline at end of file diff --git a/link/xiaomi.json b/link/xiaomi.json new file mode 100644 index 0000000..c04bf75 --- /dev/null +++ b/link/xiaomi.json @@ -0,0 +1 @@ +["xiaomi_redmi_note_10t_5g-11008.php", "xiaomi_mi_watch_revolve_active-10977.php", "xiaomi_redmi_note_10_pro_(china)-10930.php", "xiaomi_redmi_note_8_2021-10919.php", "xiaomi_poco_m3_pro_5g-10857.php", "xiaomi_redmi_k40_gaming-10880.php", "xiaomi_mi_11x_pro-10776.php", "xiaomi_mi_11x-10775.php", "xiaomi_poco_m2_reloaded-10867.php", "xiaomi_mi_mix_fold-10817.php", "xiaomi_mi_11_ultra-10737.php", "xiaomi_mi_11_pro-10816.php", "xiaomi_mi_11i-10777.php", "xiaomi_mi_11_lite_5g-10815.php", "xiaomi_mi_11_lite-10665.php", "xiaomi_black_shark_4_pro-10805.php", "xiaomi_black_shark_4-10714.php", "xiaomi_poco_x3_pro-10802.php", "xiaomi_poco_f3-10758.php", "xiaomi_mi_10s-10780.php", "xiaomi_redmi_note_10_pro-10662.php", "xiaomi_redmi_note_10_5g-10768.php", "xiaomi_redmi_note_10s-10769.php", "xiaomi_redmi_note_10-10247.php", "xiaomi_redmi_note_10_pro_max-10770.php", "xiaomi_redmi_note_10_pro_(india)-10771.php", "xiaomi_redmi_k40_pro+-10752.php", "xiaomi_redmi_k40_pro-10727.php", "xiaomi_redmi_k40-10728.php", "xiaomi_redmi_note_9t-10661.php", "xiaomi_redmi_9t-10670.php", "xiaomi_mi_10i_5g-10615.php", "xiaomi_mi_11-10656.php", "xiaomi_redmi_9_power-10616.php", "xiaomi_mi_watch_lite-10633.php", "xiaomi_redmi_note_9_pro_5g-10582.php", "xiaomi_redmi_note_9_5g-10581.php", "xiaomi_redmi_note_9_4g-10609.php", "xiaomi_redmi_watch-10610.php", "xiaomi_poco_m3-10599.php"] \ No newline at end of file diff --git a/links.py b/links.py new file mode 100644 index 0000000..f77a3ca --- /dev/null +++ b/links.py @@ -0,0 +1,45 @@ +import json +from request import Request + + +class Link: + + @staticmethod + def get_maker_link(link): # from source get each company relative url + find_maker_link = [] + source = Request.request(link) + + find_div = source.find('div', {'class': 'st-text'}) + find_all_tag_a = find_div.findAll('a') + + for tr in find_all_tag_a: + find_maker_link.append(tr.get('href')) + + return find_maker_link + + @staticmethod + # get each mobile link and save in separate file for each brand + def get_each_link_mobile(url, relative_link): + find_link_mobile = [] + source = Request.request(url) + + find_div = source.find('div', {'class': 'makers'}) + find_link_maker = find_div.findAll('a') + + for tr in find_link_maker: + find_link_mobile.append(tr.get('href')) + + if relative_link == 'samsung-phones-9.php': + with open('link/samsung.json', 'w') as s: + s.write(json.dumps(find_link_mobile)) + find_link_mobile.clear() + + if relative_link == 'apple-phones-48.php': + with open('link/apple.json', 'w') as a: + a.write(json.dumps(find_link_mobile)) + find_link_mobile.clear() + + if relative_link == 'xiaomi-phones-80.php': + with open('link/xiaomi.json', 'w') as x: + x.write(json.dumps(find_link_mobile)) + find_link_mobile.clear() diff --git a/main.py b/main.py new file mode 100644 index 0000000..597c013 --- /dev/null +++ b/main.py @@ -0,0 +1,20 @@ +from Specifications import Specifications +from links import Link + + +from pictures import Pictures +if __name__ == "__main__": + # instead of this you can call get_maker_link method in Link class and assign the value to find_maker_link + find_maker_link = ['samsung-phones-9.php', 'apple-phones-48.php', 'xiaomi-phones-80.php'] + + # link_object = Link() + # for link in find_maker_link: + # url = f"https://www.gsmarena.com/{link}" + # link_object.get_each_link_mobile(url, link) + + specification = Specifications() + specification.get_specifications() + + pictures = Pictures() + pictures.get_link() + pictures.get_picture() diff --git a/mongo.py b/mongo.py new file mode 100644 index 0000000..a52b739 --- /dev/null +++ b/mongo.py @@ -0,0 +1,15 @@ +from pymongo import MongoClient + + +class MongoDB: + instance = None + + # @classmethod + # def __new__(cls, *args, **kwargs): + # if not hasattr(cls, 'instance'): + # cls.instance = super(*args, **kwargs) + # return cls.instance + + def __init__(self): + self.client = MongoClient() + self.database = self.client['GSMArena'] diff --git a/pictures.py b/pictures.py new file mode 100644 index 0000000..4d683f3 --- /dev/null +++ b/pictures.py @@ -0,0 +1,62 @@ +import json +from request import Request + + +class Pictures: + """" + get all pictures link of each mobile + """ + + @staticmethod + def get_link(): + link_pic_page = [] + + with open('link/samsung.json', 'r') as s: + link = json.loads(s.read()) + + for li in link: + url = f"https://www.gsmarena.com/{li}" + + response = (Request.request(url)) + print(response) + find_div = response.find('div', {'class': 'article-info-line page-specs light'}) + print(find_div) + if find_div is None: + continue + tag_a = find_div.find_all('a') + if tag_a is None: + continue + for tag in tag_a: + links = tag.get('href') + if "pictures" in links: + print(links) + link_pic_page.append(links) + + with open('image/samsung_relative.json', 'w') as x: + x.write(json.dumps(link_pic_page)) + + @staticmethod + def get_picture(): + + with open("image/samsung_relative.json", 'r') as f: + pic_link = (json.loads(f.read())) + + for li in pic_link: + picture = [] + url = f"https://www.gsmarena.com/{li}" + response = (Request.request(url)) + + find_div = response.find('div', {'id': 'pictures-list'}) + if find_div is None: + continue + + phone_name = find_div.find('img') + phone_name = phone_name.get('alt') + print(phone_name) + pic = find_div.find_all('img') + print(pic) + for img in pic: + picture.append(img.get('src')) + + with open(f"img/{phone_name}.json", 'w')as f: + f.write(json.dumps(picture)) diff --git a/request.py b/request.py new file mode 100644 index 0000000..2c6fc31 --- /dev/null +++ b/request.py @@ -0,0 +1,15 @@ +from config import api +from bs4 import BeautifulSoup + + +class Request: + @staticmethod + def request(url): # request & make object of Beautiful-soup + + try: + response = api.get(url) + soup = BeautifulSoup(response['body'], 'html.parser') + return soup + + except ConnectionError as ce: + print(ce)