Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Server #12

Open
AkshayAdiga1997 opened this issue May 22, 2018 · 7 comments
Open

Running on Server #12

AkshayAdiga1997 opened this issue May 22, 2018 · 7 comments
Labels
question Further information is requested

Comments

@AkshayAdiga1997
Copy link

Really appreciate your work. I have a question. This works taking cookies. So how do you run this on Ubuntu server?

@austinoboyle
Copy link
Owner

I haven't run this on a server before, but you will likely have to install something like Xvfb. See the discussion here, and let me know if you get this working! I have a couple of scraping projects that I would love to run on dedicated servers.

@austinoboyle austinoboyle added the question Further information is requested label May 22, 2018
@austinoboyle austinoboyle reopened this May 22, 2018
@austinoboyle
Copy link
Owner

austinoboyle commented May 22, 2018

Okay, can confirm this will work on a server. This is what setup looked like for me on Centos7:

$ wget https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip
$ unzip chromedriver_linux64.zip
$ sudo mv ./chromedriver /usr/local/bin
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
$ sudo yum localinstall ./google-chrome-stable_current_x86_64.rpm
$ sudo yum install Xvfb
$ Xvfb :99 -ac &
$ export DISPLAY=:99

Then I pip installed and ran the scrape_linkedin package as per normal

@AkshayAdiga1997
Copy link
Author

Thank you!

@dsc03
Copy link

dsc03 commented Sep 6, 2018

@austinoboyle to clarify, for the list of commands you sent above, these are commands that I would need to ssh into my remote server and run/configure there correct? also, 'DISPLAY' looks like an environment variable correct?

@austinoboyle
Copy link
Owner

austinoboyle commented Sep 6, 2018

@dsc03 Yes that's correct. This was for a Centos server, but should work similarly on Ubuntu/etc with the distro's respective package manager to get xvfb

@dsc03
Copy link

dsc03 commented Sep 11, 2018

Hey @austinoboyle ,

So I've been trying to get this thing setup on my linux server, and when I run sudo yum localinstall ./google-chrome-stable_current_x86_64.rpm, I get the following issues:

Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libappindicator3.so.1()(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libnss3.so(NSS_3.22)(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libXss.so.1()(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libgdk-3.so.0()(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: xdg-utils
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libatk-1.0.so.0()(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libgdk_pixbuf-2.0.so.0()(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libgtk-3.so.0()(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libssl3.so(NSS_3.28)(64bit)
Error: Package: google-chrome-stable-69.0.3497.81-1.x86_64 (/google-chrome-stable_current_x86_64)
           Requires: libatk-bridge-2.0.so.0()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

It seems like I can skip around, which I tried and after following the rest of the commands and trying to execute my code, I was running into the following issue when I tried running my function that uses your package:

[Errno 2] No such file or directory: '/home/wsgi/.google-cookie'

Any thoughts? I've been at it for a bit now so hoping you have some insight. Thanks again.

-Daniel

@austinoboyle
Copy link
Owner

You likely need to go through each of those dependencies and install it using yum. You may need to enable certain yum repositories to install them. See this link as an example for libappindicator https://stackoverflow.com/questions/49965949/where-is-libappindicator3-so-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants