Skip to content

Commit

Permalink
updated webstore url
Browse files Browse the repository at this point in the history
  • Loading branch information
koto committed Jun 12, 2013
1 parent cdca26a commit 11e7c00
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions tools/download-addons.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
php download.php < addons.json
9 changes: 5 additions & 4 deletions tools/scrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<?php
/*
gets the list of most popular US extensions in chrome web store in json format
usage: php scrap.php > addons.json
usage: php scrap.php 1000 > addons.json
@author Krzysztof Kotowicz kkotowicz<at>gmail<dot>com
@see http://blog.kotowicz.net
*/
$url = 'https://chrome.google.com/webstore/ajax/item?hl=en&gl=US&pv={{GEN}}&count=200&token={{OFFSET}}%2C138379e14e8&marquee=false&category=popular&sortBy=0&rt=j';
$url= 'https://chrome.google.com/webstore/ajax/item?hl=en&gl=US&pv={{GEN}}&mce=ac%2Chot%2Cspa%2Cgrt%2Cctm%2Cpnc%2Cigb&count=200&marquee=true&category=extensions&sortBy=0&_reqid=883007&rt=j&=&login=&token={{OFFSET}}%4019';
//$url = 'https://chrome.google.com/webstore/ajax/item?hl=en&gl=US&pv={{GEN}}&count=200&token={{OFFSET}}%2C138379e14e8&marquee=false&category=popular&sortBy=0&rt=j';

$how_many = 10000;
$how_many = !empty($argv[1])? (int) $argv[1] : 100;
$per_page = 200;
$ext = array();

Expand Down Expand Up @@ -54,4 +55,4 @@ function process($xt, &$ext) {
}
}

echo json_encode($ext);
echo json_encode($ext);

0 comments on commit 11e7c00

Please sign in to comment.