1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

[SHARE] Script Imacros Scrape Data Tokopedia Semi Auto

Discussion in 'Berbagi Pengalaman' started by suksesterus, Aug 15, 2015.

  1. suksesterus

    suksesterus Super Hero

    Joined:
    Oct 12, 2014
    Messages:
    1,048
    Likes Received:
    106
    ini imacros untuk scrape data judul,url foto,harga,deskripsi produk disave dalam file csv.
    file csv bisa dipakai untuk posting di wordpress or blogspot juga.

    scrapenya pada halaman nama toko, contohnya ada di kode, lalu pilih jumlah tampilan product 80,,maka scriptnya di play loop sebanyak 80 kali.

    saran untuk run scriptnya pake vps atau di lepi sendiri tpi koneksi stabil dan pake image blocker biar cepet load.


    Update: penambahan variable untuk scrape berat dan kondisi, yg disave di filoe kondisi.csv. dan berat.csv
    ----------------------------------------------------------
    scriptnya seperti ini

    Code:
    VERSION BUILD=8920312 RECORDER=FX
    SET !EXTRACT_TEST_POPUP NO
    SET !ERRORIGNORE YES
    TAB T=1
    'open url https://www.tokopedia.com/taskoreamurah
    EVENT TYPE=CLICK SELECTOR="#showcase-container>DIV>DIV:nth-of-type({{!LOOP}})>A>DIV>DIV" BUTTON=0
    SET !TIMEOUT 6
    TAG POS=1 TYPE=IMG ATTR=SRC:https://ecs*.tokopedia.net/*/product/*.jpg
    TAG POS=1 TYPE=IMG ATTR=SRC:https://ecs*.tokopedia.net/*/product/*.jpg EXTRACT=HREF
    TAG POS=1 TYPE=IMG ATTR=SRC:https://ecs*.tokopedia.net/newimg/*.jpg
    TAG POS=1 TYPE=IMG ATTR=SRC:https://ecs*.tokopedia.net/newimg/*.jpg EXTRACT=HREF
    TAG POS=1 TYPE=IMG ATTR=SRC:https://ecs*.tokopedia.net/*/product-*/*.jpg
    TAG POS=1 TYPE=IMG ATTR=SRC:https://ecs*.tokopedia.net/*/product-*/*.jpg EXTRACT=HREF
    SAVEAS TYPE=EXTRACT FOLDER=C:\Users\User\Documents\iMacros\scrapetoped\ FILE=foto.csv
    SET !TIMEOUT 60
    TAG POS=1 TYPE=BUTTON ATTR=ID:cboxClose
    TAG POS=1 TYPE=H1 ATTR=CLASS:product-title<SP>green EXTRACT=TXT
    SAVEAS TYPE=EXTRACT FOLDER=C:\Users\User\Documents\iMacros\scrapetoped\ FILE=judul.csv
    ADD !EXTRACT Berat<SP>:<SP>
    TAG POS=2 TYPE=DD ATTR=CLASS:pull-left<SP>m-0 EXTRACT=TXT
    SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Kusworo\Documents\iMacros\Macros\scrapetoped\ FILE=berat.csv
    ADD !EXTRACT Kondisi<SP>:<SP>
    TAG POS=1 TYPE=DD ATTR=CLASS:pull-left<SP>m-0<SP>border-none EXTRACT=TXT
    SAVEAS TYPE=EXTRACT FOLDER=C:\Users\Kusworo\Documents\iMacros\Macros\scrapetoped\ FILE=kondisi.csv
    TAG POS=1 TYPE=DIV ATTR=CLASS:product-pricetag<SP>p-0<SP>mt-10&&ITEMTYPE:http://schema.org/Offer&&ITEMSCOPE:&&ITEMPROP:offers extract=txt
    SAVEAS TYPE=EXTRACT FOLDER=C:\Users\User\Documents\iMacros\scrapetoped\ FILE=harga.csv
    TAG POS=1 TYPE=P ATTR=CLASS:mt-20&&ITEMPROP:description EXTRACT=TXT
    SAVEAS TYPE=EXTRACT FOLDER=C:\Users\User\Documents\iMacros\scrapetoped\ FILE=deskripsi.csv
    BACK
    yg perlu diganti lokasi file .csv yg berjumlah 4 judul.csv, harga.csv, deskripsi.csv, foto.csv, jdi gan C:\Users\User\Documents\iMacros\scrapetoped\ dengan lokasi di pc anda.
    hasil dari scrape foto.csv ada kode error #EANF# jadi dihapus dengan find replace jika sudah selesai scrape dan hasil scrape bisa di posting ke wp/cepot.

    nanti akan ane share code imacrosnya untuk post ke wp.


    UPDATE >>

    ini meneruskan scrape toped >> post ke wp. script dibawah dibuat dengan menggunakan theme ol shop lokal (gk prlu di sebutin). yg terpenting di point post ke wp adalah cara upload foto produk dari url yg telah tersave di foto.csv. caranya dengan menambahkan plugin grab & save di wp. teman2 edit sendiri bagian2 penginputan data harga, deskripsi dengan meneyesuaikan theme yg dipake, caranya tinggal di record dan edit di imacrosnya dengan trial & error.

    Code:
    VERSION BUILD=8920312 RECORDER=FX
    SET !EXTRACT_TEST_POPUP NO
    SET !ERRORIGNORE YES
    SET TIMEOUT 20000
    SET !DATASOURCE_COLUMNS 6
    SET !LOOP {{myloop}}
    SET !DATASOURCE_LINE {{!LOOP}}
    TAB T=1
    URL GOTO=http://domain.com/wp-admin/post-new.php
    '-----------------------------------------------------------------------------------------------
    'Upload Foto Via Grab & Save
    TAG POS=1 TYPE=A ATTR=ID:insert-media-button
    TAG POS=1 TYPE=A ATTR=TXT:Grab<SP>&<SP>Save
    SET !DATASOURCE C:\Users\Users\Documents\iMacros\scrapetoped\foto.csv
    SET TIMEOUT 2
    FRAME F=1
    SET TIMEOUT 20
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:image-form ATTR=ID:src CONTENT={{!COL1}}
    SET !DATASOURCE C:\Users\Users\Documents\iMacros\scrapetoped\judul.csv
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:image-form ATTR=NAME:newfilename CONTENT=Jual<SP>{{!COL1}}
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:image-form ATTR=*
    '-----------------------------------------------------------------------------------------------
    REFRESH
    '-----------------------------------------------------------------------------------------------
    'Insert Foto Produk
    TAG POS=1 TYPE=A ATTR=ID:insert-media-button
    TAG POS=1 TYPE=A ATTR=TXT:Media<SP>Library
    WAIT SECONDS=4
    TAG POS=1 TYPE=DIV ATTR=CLASS:thumbnail
    SET !DATASOURCE C:\Users\Users\Documents\iMacros\scrapetoped\judul.csv
    TAG POS=42 TYPE=INPUT:TEXT ATTR=* CONTENT=Jual<SP>{{!COL1}}
    TAG POS=1 TYPE=A ATTR=TXT:Insert<SP>into<SP>post
    '-----------------------------------------------------------------------------------------------
    WAIT SECONDS=2
    '-----------------------------------------------------------------------------------------------
    'Input Data judul, harga, deskripsi, edit lgi sesuaikan dengan theme yg temen2 pake
    TAG POS=1 TYPE=TEXTAREA FORM=ID:post ATTR=ID:content EXTRACT=TXT
    SET !CLIPBOARD {{!EXTRACT}}
    SET !DATASOURCE C:\Users\Users\Documents\iMacros\scrapetoped\deskripsi.csv
    TAG POS=1 TYPE=TEXTAREA FORM=ID:post ATTR=ID:content CONTENT={{!CLIPBOARD}}<P>{{!COL1}}</P>
    WAIT SECONDS=2
    SET !DATASOURCE C:\Users\Users\Documents\iMacros\scrapetoped\judul.csv
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:post ATTR=ID:title CONTENT=Jual<SP>{{!COL1}}
    SET TIMEOUT 2
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:post ATTR=ID:yoast_wpseo_title CONTENT=Jual<SP>{{!COL1}}
    SET TIMEOUT 2
    TAG POS=1 TYPE=TEXTAREA FORM=ID:post ATTR=ID:yoast_wpseo_metadesc CONTENT={{!COL1}}
    SET !DATASOURCE C:\Users\Users\Documents\iMacros\scrapetoped\harga.csv
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:post ATTR=ID:harga CONTENT={{!COL1}}
    '-----------------------------------------------------------------------------------------------
    'id kategorinya sesuaikan dengan punya agan, record saja pakai imacros
    TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:post ATTR=ID:in-category-918 CONTENT=YES
    '-----------------------------------------------------------------------------------------------
    WAIT SECONDS=3
    EVENT TYPE=CLICK SELECTOR="#publish" BUTTON=0
    
    jika data di csv jumlah 80 maka di set Play (Loop) 80.

    NOTE:
    biasakan izin dulu sebelum coba kode diatas, lapor apabila code tidak work dan kasih masukan untuk membuat script diatas lebih powerfull.
     
    Last edited: Nov 6, 2015
  2. irsyahtra

    irsyahtra Super Hero

    Joined:
    Mar 6, 2014
    Messages:
    1,874
    Likes Received:
    104
    Location:
    Medan, Sumatera Utara
    Mantap, ditunggu ya gan sharing code imacrosnya buat ngepost :D
     
    footagesia likes this.
  3. kited

    kited AdSense Fan

    Joined:
    Dec 3, 2011
    Messages:
    178
    Likes Received:
    2
    Location:
    jakarta
    ini yg di cari2...
    mantap sharenya mastah...
    like dipencet
     
  4. dudev

    dudev Super Hero

    Joined:
    Feb 13, 2013
    Messages:
    752
    Likes Received:
    20
    bukmak dulu masgan, bwt praktek ntar..
     
  5. mencariski

    mencariski AdSense Starter

    Joined:
    Jul 3, 2015
    Messages:
    82
    Likes Received:
    0
    Location:
    Indonesia
    sip makasih banyak, tinggal nunggu script buat post ke wordrpess
     
  6. mencariski

    mencariski AdSense Starter

    Joined:
    Jul 3, 2015
    Messages:
    82
    Likes Received:
    0
    Location:
    Indonesia
    Lapor : Work, script bekerja dengan baik, ditunggu script post wordpress sesuai janji agan :D
     
    Last edited: Aug 16, 2015
  7. Agus Pian

    Agus Pian Blogger Super Ngeraos

    Joined:
    Apr 19, 2013
    Messages:
    3,333
    Likes Received:
    116
    Location:
    NTB
    ijin coba bro
     
  8. suksesterus

    suksesterus Super Hero

    Joined:
    Oct 12, 2014
    Messages:
    1,048
    Likes Received:
    106
    Teman2 udah saya update script untuk meneruskan data hasil scrape di tokopedia ke wordpress. silahkan di coba dan jika ada yang ingin merevisi script diatas silahkan di share disini. bertujuan untuk membuat script yang ada lebih banyak fungsi dan bermanfaat untuk yang membutuhkan.
     
  9. laprihat

    laprihat New Comer

    Joined:
    Nov 13, 2011
    Messages:
    23
    Likes Received:
    0
    ijin nyoba gan..
    bisa buat posting ke blogcepot ga..?
     
  10. dianaza

    dianaza AdSense Fan

    Joined:
    Jun 7, 2011
    Messages:
    179
    Likes Received:
    4
    Location:
    Mantani
    Ijin nyicip script nya boss...
     
  11. suksesterus

    suksesterus Super Hero

    Joined:
    Oct 12, 2014
    Messages:
    1,048
    Likes Received:
    106

    Silahkan gan,,

    Nanti ane buat untuk blogcepotnya gan,,tunggu aja
     
    marzuki123 likes this.
  12. cintanyadoi

    cintanyadoi AdSense Pro

    Joined:
    Dec 30, 2013
    Messages:
    495
    Likes Received:
    13
    ijin bookmark..belum nyoba gan, inshaallah akan nyoba
     
  13. awaluddin.bahar

    awaluddin.bahar Banned

    Joined:
    Jul 15, 2015
    Messages:
    26
    Likes Received:
    1
    Location:
    Indonesia
    wah mau coba bgt nih
     
  14. gianotombeg

    gianotombeg New Comer

    Joined:
    Aug 19, 2015
    Messages:
    42
    Likes Received:
    0
    Maaf sebelumnya saya kok gak ngerti ya ini untuk apa ?? Apa fungsinya khusus dropshipper ??? Jadi misal saat ada pelanggan datang ke blog kita membeli barang langsung auto pilot seting dropshipper sama toko yg kita join begitu ya mas ???

    Jika iya super power bgt mas....
    Yg saya bingung cara masang x gmna hehehe

    Maaf newbi....
    Trimakasih yg bersedia menjawab...semoga smakin berkah ilmunya...amiinnn

    Sent from my GT-I8262 using Tapatalk
     
  15. mrfirmansyah91

    mrfirmansyah91 Banned

    Joined:
    Aug 22, 2015
    Messages:
    41
    Likes Received:
    0
    wah cicip imacrosnya ah
     
  16. anggaraksa

    anggaraksa Super Hero

    Joined:
    Jan 16, 2013
    Messages:
    1,021
    Likes Received:
    65
    Location:
    Tasikmalaya
    sebenernya udah punya yang beginian, tapi tetep aja pengen nyoba :D
     
  17. harrianggoro

    harrianggoro New Comer

    Joined:
    Aug 26, 2015
    Messages:
    35
    Likes Received:
    1
    gimana sih cara testnya ...
     
  18. zeadnevercool

    zeadnevercool Hero

    Joined:
    Feb 10, 2012
    Messages:
    591
    Likes Received:
    46
    ijin coba gan... :D

    update:

    gan, waktu mau coba, keluar pesan eror gini: 'wrong format of SAVEAS command, line 14 (Error code: 910)'

    dimana salah ya!? :hmm2:
     
    Last edited: Aug 27, 2015
  19. suksesterus

    suksesterus Super Hero

    Joined:
    Oct 12, 2014
    Messages:
    1,048
    Likes Received:
    106
    Salah copas itu gan
    Biasanya ''SAVEASTYPE=EXTRACT FOLDER='' spasi hilang yang bener ''SAVEAS TYPE=EXTRACT FOLDER=''
    Coba cek scriptnya.
     
  20. kakean[dot]com

    kakean[dot]com AdSense Starter

    Joined:
    Aug 28, 2015
    Messages:
    98
    Likes Received:
    1
    Booxmark dulu...
     
    Zain Jauhari likes this.

Share This Page