Scrape tok*p*dia xpath

 

scrape dalam bentuk xpath website tok*p*dia dengan url format:

https://www.tok*p*dia.com/search?st=product&q=      &pmin=   

jadi contohnya sbb:

https://www.tok*p*dia.com/search?st=product&q=xbox%20360&pmin=200000

https://www.tok*p*dia.com/search?st=product&q=kaos kaki&pmin=5000

total akan ada 60 hasil per halaman, atau 12 baris (1 baris teratas dan terbawah adalah promosi, tidak perlu diikutsertakan), yang perlu discrape adalah untuk masing-masing:

- nama barangnya

- harga

- nama toko

- lokasi

- rating

- url tokonya

- url pic thumbnailnya

- url page selanjutnya (halaman ke-2)

jadi mungkin bisa di for loop untuk

parentnya lalu masing-masing propertynya di-query lagi pakai xpath.

contoh:

        product_descs = response.xpath('//*[@class="basic-products basic-products--grid"]/ul/li')

        for product in product_descs:

            price = product.xpath('.//*[@class="amount positive"]/text()').extract_first()

            // title = ...


xpath nya disini yang harus dicari untuk item-item di atas

Python Web Scrapping XML

Project Class: Micro (Under 500rb)
Published Budget: Rp 200,000
Finish Days: 7
Published Date: 07/10/2018 07:35:05 WIB
Start Date: 07/10/2018 12:38:27 WIB
Project Status: Closed
Accepted Worker: Hary roots (hary_ak)
Accepted Budget: Rp 250,000
Project Ending: Completed
Finish Date: 09/10/2018 18:43:34 WIB

Project Owner

magicmagnate
Kota Bogor
    
10.00/10.00
28 Point
#4,952 dari 214,889
Rated Worker: 9.00/10.00

Sesuai deskripsi (web scraping) & profesional.

Accepted Worker

hary_ak
    
9.89/10.00
783 Point
#380 dari 214,889
Rated Owner: 10.00/10.00

terimakasih banyak bpk,
glad to work with you

  User Bids

hary_ak
    
9.89/10.00

Recommended Workers

Iswanto

21,707 points
439 projects
    
9.73/10.00

Muhammad.Rahman

13,529 points
150 projects
    
9.89/10.00

steven.comptia

35,431 points
810 projects
    
9.97/10.00

imzers

12,776 points
61 projects
    
9.89/10.00

MCandraEkaSaputra

12,057 points
79 projects
    
9.87/10.00

Recommended Services

Script Full Code Mutasi Bank

Rp 45,000,000
5 sales
    
9.80/10.00

Pembuatan bot line

Rp 1,500,000
6 sales
    
10.00/10.00

Jasa Optimasi Pagespeed Website WordPress

Rp 500,000
18 sales
    
9.39/10.00

Aplikasi Jasa Servis dan panggil Teknisi

Rp 3,800,000
2 sales
    
10.00/10.00

Open Projects

Membuat Form Input Data & Data Output

Open to SuggestionsOwner: rahmawanardi
Deadline: 7 days

Update fitur whatsapp otomatis

Open to SuggestionsOwner: anggaceria
Deadline: 7 days

Jasa Scrape Datatables

Rp 1,000,000Owner: dramagod
Deadline: 1 days

Bantu saya buatkan 1 Homepage 1 Halaman website dari laravel,

Open to SuggestionsOwner: ressrich
Deadline: 1 days

Bantu saya Carikan Templte Html

Open to SuggestionsOwner: ressrich
Deadline: 1 days