Category : web-scraping

hi i want to know if there is software that can save response info in csv file this the request code POST /index.php HTTP/1.1 Host: url User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0 Accept: application/json, text/javascript, */*; q=0.01 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded X-Requested-With: XMLHttpRequest Content-Length: 44 Origin: url Connection: ..

Read more

I am trying to get the number of followers of an instagram account with this: <?php $otherPage = ‘nasa’; $response = file_get_contents("https://www.instagram.com/nasa/?__a=1"); if ($response !== false) { $data = json_decode($response, true); if ($data !== null) { $follows = $data[‘graphql’][‘user’][‘edgeedge_followed_by_follow’][‘count’]; $followedBy = $data[‘graphql’][‘user’][”][‘count’]; echo $follows . ‘ and ‘ . $followedBy; } } ?> But it ..

Read more

How could I go about get, for example, the number of followers of an account from a instagram account page? for example this https://www.instagram.com/zuck/. I need this because I wanted to do a follower counter or something similar. I tried to use this library: https://sourceforge.net/projects/simplehtmldom/files/latest/download and the following code which, through the id of a ..

Read more

suppose i have html code like this: <body> <div class="mainbox"> <span class="auto">one</span> <span class="auto">two</span> <span class="auto">three</span> <span class="car">four</span> <span class="car">five</span> <span class="apple">six</span> </div> </body> My php code for getting the plaintext value from all the span: $mainbox = $html->find(‘div[class="mainbox"]’)->plaintext; echo $mainbox.'<br>’; This shows output like this: one two three four five six Now i want ..

Read more

I am currently new in (simple html dom). And i want to fetch some data with another site Now, Suppose i have a html code like this: <div class="mainbox"> <div class="category"> <span class="Fruit">Mango</span> <span class="flower">Marigold</span> </div> <div class="category"> <span class="Fruit">Apple</span> <span class="flower">Rose</span> </div> <div class="category"> <span class="Fruit">Orange</span> </div> </div> And for getting the plaintext value ..

Read more

As an intern, I have to scrap the price of a product sheet on a site. But the div contains multiple spans with prices and only one contains the actual price that is displayed. Their absolute left position changes with each refresh. So when I do something like $productPrice $packtPageXpath->query(‘//div[@class="bloc_price"]’); if ($productPrice->length > 0) { ..

Read more