Jump to content

[RST] Instagram scrapper

Recommended Posts

Ce face acest script:

Salveaza toate pozele unui utilizator predefinit de vo intr-un folder, pozele fiind numerotate de la prima la ultima, de exemplu daca respectivul utilizator are 3 poze, o sa aveti 3 poze cu numele: 0.jpg, 1.jpg, 2.jpg. Totodata scriptul salveaza un txt cu numele respectivei imagini in care se afla Url, Image link, Caption, Likes si Comments.

Script: http://pastebin.com/raw.php?i=BTY30W7B

Ce trebuie sa facem ca sa functioneze scriptul:

Intram pe Register • Instagram Developer Documentation , inregistrati o aplicatie cu orice redirect_uri, debifati "Disable implicit OAuth". Acum modificati ce este cu bold in linkul urmator:

si intram pe el.

O sa va returneze tokenul.

In script trebuie sa modificati liniile comentate, respectiv

$url = file_get_contents("https://api.instagram.com/v1/users/search?q=" . $user . "&client_id=CLIENT_ID"); // aici trebuie sa modifici client_id


$api = "https://api.instagram.com/v1/users/" . $uID . "/media/recent?access_token=ACCESS_TOKEN"; // aici trebuie sa modifici access_token

si gata.

Acum puteti rula scriptul intr-o consola. De exemplu: "php numelefisierului.php username" <- acolo vine usernameul celuia care vreti sa-i scrapati profilul.


Edited by askwrite
  • Downvote 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...