B3n3 / 9gag_downloader

Python script to download whole profiles etc. from 9gag.com
Do What The F*ck You Want To Public License
7 stars 2 forks source link

How to run this ? #1

Closed n13oss closed 3 years ago

n13oss commented 5 years ago

I open cmd and type python 9gag.py http://9gag.com/u/*My profiles*

but nothing happen

B3n3 commented 5 years ago

Hi

Could you maybe post the exact output of the run? Maybe there is just a missing library or something.

Cheers

On Wed, Dec 12, 2018, 05:54 n13oss <notifications@github.com wrote:

I open cmd and type python 9gag.py http://9gag.com/u/*My profiles*

but nothing happen

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/B3n3/9gag_downloader/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-UgUFcW1qzOXFCynWE7rL6Ma-pluSwks5u4IwNgaJpZM4ZOu3e .

n13oss commented 5 years ago

Hi , Thx for reply sir. it's said python is not recognized as an internal or external command

B3n3 commented 5 years ago

This clearly indicates that python is not correctly installed on your computer. In case you already installed it, maybe the PATH variable was not updated during the installation. I'd recommend to (re)install python and look out for options about the PATH variable.

On Wed, Dec 12, 2018, 08:03 n13oss <notifications@github.com wrote:

Hi , Thx for reply sir. it's said python is not recognized as an internal or external command

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/B3n3/9gag_downloader/issues/1#issuecomment-446483971, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-UgRt8af0gdrSLVKDxfIjoWkiEuPkoks5u4KotgaJpZM4ZOu3e .

n13oss commented 5 years ago

ok understand it. I will try again tonight because this is company pc I cannot install anything.

n13oss commented 5 years ago

hi , i can run python now , but there error on it. I write code like this

python 9gag.py https://9gag.com/u/n13oss/likes download

it that correct ?

and the error code is

File "9gag.py", line 18 print "Usage: ", sys.argv[0], "url_to_download download_directory" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Usage: ", sys.argv[0], "url_to_download download_directory")?

B3n3 commented 5 years ago

The script was made for python 2.7 Apparently you use version 3, which is not supported yet.

On Wed, Dec 12, 2018, 12:26 n13oss <notifications@github.com wrote:

hi , i can run python now , but there error on it. I write code like this

python 9gag.py https://9gag.com/u/n13oss/likes download

it that correct ?

and the error code is

File "9gag.py", line 18 print "Usage: ", sys.argv[0], "url_to_download download_directory" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Usage: ", sys.argv[0], "url_to_download download_directory")?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/B3n3/9gag_downloader/issues/1#issuecomment-446554696, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-Uge2l12pLtju2INgxDyfaSCZHGVMFks5u4OffgaJpZM4ZOu3e .

n13oss commented 5 years ago

I download python 2.7.15 and install it but still error code still show.

Traceback (most recent call last): File "9gag.py", line 7, in import requests ImportError: No module named requests

B3n3 commented 5 years ago

Please run "pip install requests" as stated in the readme.

On Wed, Dec 12, 2018, 13:04 n13oss <notifications@github.com wrote:

I download python 2.7.15 and install it but still error code still show.

Traceback (most recent call last): File "9gag.py", line 7, in import requests ImportError: No module named requests

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/B3n3/9gag_downloader/issues/1#issuecomment-446564579, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-Uga-BXDTRU0fpqCJ_BbArT1Oc_c8wks5u4PDNgaJpZM4ZOu3e .

n13oss commented 5 years ago

I dont know I am doing correctly i check my pip version is 18.1 already . about io , sys , os things i dont get it. it's too far for me.

it is these thing ? https://pypi.org/project/os-win/ https://pypi.org/project/syspath/

n13oss commented 5 years ago

hello again , I try to find how to install request and maybe it's work now because error this time is not from script but it said

Invalid URL: https://9gag.com/u/n13oss/likes

about your script is work on what address ? I type same command

python 9gag.py https://9gag.com/u/n13oss/likes download

and I already create download folder in the same folder of script. Am I doing correctly ?

slytidar commented 5 years ago

hey were you able to get it to work ? im still stuck at syntax error

n13oss commented 5 years ago

Nope , but your can follow me until creator answer. First , you need to install python 2.7 then update pip. update pip follow this link

https://packaging.python.org/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line

if you do correctly you will get invalid url like me haha

B3n3 commented 5 years ago

Hi

Please check your input before running the python script. The URL you are using is invalid: https://9gag.com/u/n13oss/likes , Check it in the browser, it produces a 404 not found error.

Your likes need to be public , as the script does not use your login credentials. You can enable this in your profile settings.

In the README it is clearly stated, that you should use an URL in this form: http://9gag.com/u/n13oss

Please try again with the correct URL and enabled public likes.

Best regards

n13oss commented 5 years ago

oh , it is my bad. I dont recognize s behind http. About public upvote in my profile , I dont know 9gag remove it or not because there no setting for this. I can only change my Avatar Name Status Gender Birthday Country and in application are the same too.

slytidar commented 5 years ago

im not sure if i updated the PIP correctly but im still getting the syntax error with an error pointing to "9" in 9gag.py

slytidar commented 5 years ago

oh i got it to work but nothing is saved

n13oss commented 5 years ago

really ? how you open upvote to be public ? I look for all profile and setting but nothing about upvote there.

slytidar commented 5 years ago

Im not sure but my posts are always public. It says finished but nothing is saved