🤬
  • ■ ■ ■ ■ ■ ■
    README.md
    skipped 128 lines
    129 129   
    130 130  # Installation
    131 131   
    132  -Depending upon your Python (v. 3) installation, the module dependencies are `numpy`, `requests`, `selenium`, and `Faker`, as well as `phantomjs`. How you install these depends upon your OS.
     132 +Depending upon your Python (v. 3) installation, the module dependencies are `numpy`, `requests`, `selenium`, and `fake_useragent`, as well as `chromedriver`. How you install these depends upon your OS.
    133 133   
    134 134  This involves choosing a Python (v. 3) package manager, typically `pip` or `Anaconda`.
    135 135   
    136 136  I like `pip`, so on my machines I would say:
    137 137   
    138 138  ```
    139  -sudo pip-3.4 install numpy requests selenium Faker OpenSSL
     139 +sudo pip-3.4 install numpy requests selenium fake_useragent OpenSSL
    140 140  ```
    141 141   
    142  -## PhantomJS
     142 +## ChromeDriver
    143 143   
    144  -It is recommended that the `phantomjs` binary be installed directly from [phantomjs.org](http://phantomjs.org/download.html). Be sure to verify the [checksum](http://phantomjs.org/download.html#checksums) of the downloaded installation.
     144 +It is recommended that the `chromedriver` binary be installed directly from [chromedriver.chromium.org](http://chromedriver.chromium.org/downloads. Be sure to verify the [Etag](https://chromedriver.storage.googleapis.com/index.html?path=2.42/) of the downloaded installation.
    145 145   
    146 146  ## macOS
    147 147   
    148 148  The [MacPorts](https://www.macports.org) install command is:
    149 149   
    150 150  ```
    151  -sudo port install py34-numpy py34-requests py34-psutil py34-openssl phantomjs psutil
     151 +sudo port install chromedriver py36-numpy py36-requests py36-psutil py36-openssl psutil
    152 152  ```
    153 153   
    154 154  This is what was also necessary on macOS:
    155 155   
    156 156  ```
    157  -sudo port install phantomjs
    158  -sudo -H pip-3.4 install selenium
     157 +sudo port install chromedriver
     158 +sudo -H pip-3.6 install selenium fake_useragent
    159 159   
    160  -# if phantonjs fails to build because of an Xode configuration error: test with
     160 +# if chromedriver fails to install because of an Xode configuration error: test with
    161 161  /usr/bin/xcrun -find xcrun
    162 162  # then do this:
    163 163  cd /Applications/Xcode.app/Contents/Developer/usr/bin/
    skipped 11 lines
    175 175  sudo yum -y groupinstall development
    176 176  sudo yum -y install python34 python34-pip python34-devel python34-pyflakes openssl-devel
    177 177  sudo pip3 install --upgrade pip
    178  -sudo pip3 install numpy psutil requests selenium faker pyopenssl
     178 +sudo pip3 install numpy psutil requests selenium fake_useragent pyopenssl
    179 179  ```
    180 180   
    181 181  ### Ubuntu16
    skipped 9 lines
    191 191  sudo -H pip3 install psutil --upgrade
    192 192  sudo -H pip3 install --upgrade pip
    193 193  sudo -H pip3 install selenium
    194  -sudo -H pip3 install faker
     194 +sudo -H pip3 install fake_useragent
    195 195  sudo -H pip3 install pyopenssl
    196 196  sudo apt-get install fontconfig
    197 197  sudo apt-get install libfontconfig
    skipped 1 lines
    199 199  sudo apt-get install libfreetype6 libfreetype6-dev
    200 200  sudo apt-get install libfontconfig1 libfontconfig1-dev
    201 201   
    202  -export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
    203  -sudo mv $PHANTOM_JS /usr/local/share
     202 +#! Please update these commands for chromedriver
     203 +# export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
     204 +# sudo mv $PHANTOM_JS /usr/local/share
    204 205  ls /usr/local/share
    205  -sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
    206  -phantomjs --version
     206 +# sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
     207 +# phantomjs --version
    207 208  python3 isp_data_pollution.py
    208 209  ```
    209 210   
    skipped 1 lines
    211 212   
    212 213  ## Headless
    213 214   
    214  -`phantomjs` requires some graphical software, virtual or otherwise, so on a headless computer, you'll need the following system package and local package.
     215 +`chromedriver` requires some graphical software, virtual or otherwise, so on a headless computer, you'll need the following system package and local package.
    215 216   
    216 217  If you're not using virtualenv (below) then run pip as sudo.
    217 218   
    skipped 8 lines
    226 227  ```
    227 228  pushd ~/.virtualenvs/ && virtualenv -p python3 isp-pollute && popd
    228 229  workon isp-pollute
    229  -pip install numpy requests selenium Faker psutil
    230  -sudo apt-get install phantomjs
     230 +pip install numpy requests selenium fake_useragent psutil
     231 +sudo apt-get install chromedriver
    231 232  ```
    232 233   
Please wait...
Page is in error, reload to recover