All Projects → enghamzasalem → Souqscraper

enghamzasalem / Souqscraper

Simple scriptes for Level UP your scraping Skills, and source code for Level UP playlist on Youtube

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Souqscraper

chopper
Chopper is a tool to extract elements from HTML by preserving ancestors and CSS rules
Stars: ✭ 22 (-81.36%)
Mutual labels:  scraping, beautifulsoup
Euro2016 TerminalApp
⚽ Instantly find 🏆EURO 2016 live-streams & highlights, now a Web App!
Stars: ✭ 54 (-54.24%)
Mutual labels:  scraping, beautifulsoup
Languagepod101 Scraper
Python scraper for Language Pods such as Japanesepod101.com 👹 🗾 🍣 Compatible with Japanese, Chinese, French, German, Italian, Korean, Portuguese, Russian, Spanish and many more! ✨
Stars: ✭ 104 (-11.86%)
Mutual labels:  scraping, beautifulsoup
Scrapple
A framework for creating semi-automatic web content extractors
Stars: ✭ 464 (+293.22%)
Mutual labels:  scraping, beautifulsoup
Scraper-Projects
🕸 List of mini projects that involve web scraping 🕸
Stars: ✭ 25 (-78.81%)
Mutual labels:  scraping, beautifulsoup
linkedin-scraper
Tool to scrape linkedin
Stars: ✭ 74 (-37.29%)
Mutual labels:  scraping, beautifulsoup
Requests Html
Pythonic HTML Parsing for Humans™
Stars: ✭ 12,268 (+10296.61%)
Mutual labels:  scraping, beautifulsoup
html-table-extractor
extract data from html table
Stars: ✭ 74 (-37.29%)
Mutual labels:  scraping, beautifulsoup
TorScrapper
A Scraper made 100% in Python using BeautifulSoup and Tor. It can be used to scrape both normal and onion links. Happy Scraping :)
Stars: ✭ 24 (-79.66%)
Mutual labels:  scraping, beautifulsoup
Easy Scraping Tutorial
Simple but useful Python web scraping tutorial code.
Stars: ✭ 583 (+394.07%)
Mutual labels:  scraping, beautifulsoup
Daftlistings
A library that enables programmatic interaction with daft.ie. Daft.ie has nationwide coverage and contains about 80% of the total available properties in Ireland.
Stars: ✭ 86 (-27.12%)
Mutual labels:  beautifulsoup
Dataengineeringproject
Example end to end data engineering project.
Stars: ✭ 82 (-30.51%)
Mutual labels:  scraping
Pudzu
Various python scripts, mostly geared towards dataviz.
Stars: ✭ 104 (-11.86%)
Mutual labels:  beautifulsoup
Scrapy
Scrapy, a fast high-level web crawling & scraping framework for Python.
Stars: ✭ 42,343 (+35783.9%)
Mutual labels:  scraping
Billy
legacy backend for Open States
Stars: ✭ 85 (-27.97%)
Mutual labels:  scraping
Geziyor
Geziyor, a fast web crawling & scraping framework for Go. Supports JS rendering.
Stars: ✭ 1,246 (+955.93%)
Mutual labels:  scraping
Google Covid19 Mobility Reports
Data extraction of Google's COVID-19 Mobility Reports
Stars: ✭ 82 (-30.51%)
Mutual labels:  scraping
Email Extractor
The main functionality is to extract all the emails from one or several URLs - La funcionalidad principal es extraer todos los correos electrónicos de una o varias Url
Stars: ✭ 81 (-31.36%)
Mutual labels:  scraping
Jobfunnel
Scrape job websites into a single spreadsheet with no duplicates.
Stars: ✭ 1,528 (+1194.92%)
Mutual labels:  beautifulsoup
Webmagic
A scalable web crawler framework for Java.
Stars: ✭ 10,186 (+8532.2%)
Mutual labels:  scraping

SouqScraper

Script for scarping items from souq.com using BeautifulSoup and Python3 you need to install Python3 and BeautifulSoup

the code is very simple

import requests
import urllib.request
import time
from bs4 import BeautifulSoup
import json
import csv
filecsv = open('SouqDataapple.csv', 'w',encoding='utf8')
file = open('SouqDataapple.json','w',encoding='utf8')
# Set the URL you want to webscrape from
url = 'https://saudi.souq.com/sa-ar/apple/new/a-c/s/?section=2&page='
file.write('[\n')
data = {}
csv_columns = ['name','price','img']
for page in range(1000):
    print('---', page, '---')
    r = requests.get(url + str(page))
    print(url + str(page))
    soup = BeautifulSoup(r.content, "html.parser")
    ancher=soup.find_all('div',{'class' : 'column column-block block-grid-large single-item'})
    writer = csv.DictWriter(filecsv, fieldnames=csv_columns)
    i=0
    writer.writeheader()
    for pt in  ancher:        
file.write("\n]")
filecsv.close()
file.close()

and the output will be :

[
{"name": "سماعات ابل اير بودز اللاسلكية، ابيض - MMEF2                ", "price": "665.00", "img": "https://cf4.s3.souqcdn.com/item/2016/10/06/11/64/54/16/item_M_11645416_16747749.jpg"},
{"name": "ابل ايفون 6 مع فيس تايم - 32 جيجا، الجيل الرابع ال تي اي، رمادي                ", "price": "1,160.34", "img": "https://cf4.s3.souqcdn.com/item/2017/03/06/22/15/33/89/item_M_22153389_29502098.jpg"},
{"name": "ابل ايفون X مع فايس تايم - 64 جيجا, الجيل الرابع ال تي اي, رمادي                ", "price": "3,199.00", "img": "https://cf5.s3.souqcdn.com/item/2018/01/30/24/05/14/26/item_M_24051426_102956405.jpg"},
{"name": "ابل ايفون 8 مع فايس تايم - 64 جيجا, الجيل الرابع ال تي اي, ذهبي                ", "price": "2,224.99", "img": "https://cf3.s3.souqcdn.com/item/2017/09/12/24/05/14/31/item_M_24051431_35103527.jpg"},
{"name": "ابل ايفون 8 Plus مع فايس تايم - 64 جيجا, الجيل الرابع ال تي اي, ذهبي                ", "price": "2,548.99", "img": "https://cf5.s3.souqcdn.com/item/2017/09/12/24/05/14/47/item_M_24051447_35103542.jpg"},
{"name": "ابل ايفون 6 بدون فيس تايم- 32 جيجا، الجيل الرابع ال تي اي، ذهبي                ", "price": "1,148.00", "img": "https://cf3.s3.souqcdn.com/item/2017/03/06/22/15/34/81/item_M_22153481_29502385.jpg"},
{"name": "ابل ايفون 6s مع فيس تايم - 64 جيجا، الجيل الرابع LTE، رمادي                ", "price": "3,270.00", "img": "https://cf3.s3.souqcdn.com/item/2015/09/10/89/92/27/3/item_M_8992273_9434431.jpg"},
{"name": "ساعة كورين للرجال - رياضية بسوار من الجلد الصناعي - 8139                ", "price": "23.50", "img": "https://cf2.s3.souqcdn.com/item/2014/05/02/68/93/69/6/item_M_6893696_4618742.jpg"},
{"name": "عطر كالفن كلاين ذا ون للرجال و النساء، متوسط التركيز، 200مل                ", "price": "101.78", "img": "https://cf2.s3.souqcdn.com/item/2015/07/21/46/37/21/4/item_M_4637214_8674641.jpg"},
{"name": "عطر بيوتي النسائي من كالفن كلاين - او دي بارفان، 100 مل                ", "price": "109.85", "img": "https://cf5.s3.souqcdn.com/item/2017/02/20/45/50/82/3/item_M_4550823_28793157.jpg"},
{"name": "سماعات ابل اير بودز اللاسلكية، ابيض - MMEF2                ", "price": "665.00", "img": "https://cf4.s3.souqcdn.com/item/2016/10/06/11/64/54/16/item_M_11645416_16747749.jpg"},
{"name": "ابل ايفون 6 مع فيس تايم - 32 جيجا، الجيل الرابع ال تي اي، رمادي                ", "price": "1,160.34", "img": "https://cf4.s3.souqcdn.com/item/2017/03/06/22/15/33/89/item_M_22153389_29502098.jpg"},
{"name": "ابل ايفون X مع فايس تايم - 64 جيجا, الجيل الرابع ال تي اي, رمادي                ", "price": "3,199.00", "img": "https://cf5.s3.souqcdn.com/item/2018/01/30/24/05/14/26/item_M_24051426_102956405.jpg"},
{"name": "ابل ايفون 8 مع فايس تايم - 64 جيجا, الجيل الرابع ال تي اي, ذهبي                ", "price": "2,224.99", "img": "https://cf3.s3.souqcdn.com/item/2017/09/12/24/05/14/31/item_M_24051431_35103527.jpg"},
{"name": "ابل ايفون 8 Plus مع فايس تايم - 64 جيجا, الجيل الرابع ال تي اي, ذهبي                ", "price": "2,548.99", "img": "https://cf5.s3.souqcdn.com/item/2017/09/12/24/05/14/47/item_M_24051447_35103542.jpg"},
{"name": "ابل ايفون 6 بدون فيس تايم- 32 جيجا، الجيل الرابع ال تي اي، ذهبي                ", "price": "1,148.00", "img": "https://cf3.s3.souqcdn.com/item/2017/03/06/22/15/34/81/item_M_22153481_29502385.jpg"},
{"name": "ابل ايفون 6s مع فيس تايم - 64 جيجا، الجيل الرابع LTE، رمادي                ", "price": "3,270.00", "img": "https://cf3.s3.souqcdn.com/item/2015/09/10/89/92/27/3/item_M_8992273_9434431.jpg"},
{"name": "ساعة كورين للرجال - رياضية بسوار من الجلد الصناعي - 8139                ", "price": "23.50", "img": "https://cf2.s3.souqcdn.com/item/2014/05/02/68/93/69/6/item_M_6893696_4618742.jpg"},
{"name": "عطر كالفن كلاين ذا ون للرجال و النساء، متوسط التركيز، 200مل                ", "price": "101.78", "img": "https://cf2.s3.souqcdn.com/item/2015/07/21/46/37/21/4/item_M_4637214_8674641.jpg"},
{"name": "عطر بيوتي النسائي من كالفن كلاين - او دي بارفان، 100 مل                ", "price": "109.85", "img": "https://cf5.s3.souqcdn.com/item/2017/02/20/45/50/82/3/item_M_4550823_28793157.jpg"},
{"name": "سماعات ابل اير بودز اللاسلكية، ابيض - MMEF2                ", "price": "665.00", "img": "https://cf4.s3.souqcdn.com/item/2016/10/06/11/64/54/16/item_M_11645416_16747749.jpg"},
]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].