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

saving file+hashtags #17

Closed
ahmedalrawi opened this issue Jan 4, 2022 · 5 comments
Closed

saving file+hashtags #17

ahmedalrawi opened this issue Jan 4, 2022 · 5 comments

Comments

@ahmedalrawi
Copy link

ahmedalrawi commented Jan 4, 2022

Hi,
Thanks for the update! I have Windows 10, and I am running Python from the shell. The script is fetching user's posts now, but is there a way to save the data as a file e.g. JSON or CSV. I tried using filename.json in the end of the command, but it didn't work. Then I used --o filename.json which also didn't work

Regarding hashtag search, it does not seem to be working because of the command argument. I tried alternative formats e.g. gogettr hashtags [#selfie] OR gogettr hashtags [selfie] OR gogettr hashtags #selfie OR gogettr hashtags [OPTIONS] #selfie...etc, but I always get the same error: Error: Got unexpected extra arguments ([OPTIONS].
Thanks!
Ahmed

@milesmcc
Copy link
Collaborator

milesmcc commented Jan 4, 2022

Ah! Sounds like you're using PowerShell/Command Prompt. You need to use Bash or Zsh (the > filename format is a Bash feature). That explains all the weird errors you're getting. It'd definitely be easier if you were using Mac or Linux — perhaps you could run Linux in a VM? Or you could run Bash directly — see https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

@ahmedalrawi
Copy link
Author

Thanks! I followed the instructions on the site you shared and later installed Ubuntu, but it states here (https://packages.ubuntu.com/) that the gogettr package is not available. Hence, I'm still getting the following error: E: Unable to locate package gogettr

@KonradIT
Copy link
Contributor

KonradIT commented Jan 4, 2022

So you need to use either pypi or use the command line from source. The readme goes over this, but basically if you want the latest stable build you'd do: pip3 install gogettr. If you want to use the command line from source: https://github.com/stanfordio/gogettr#development

Just make sure you have python v3.8 installed.

@ahmedalrawi
Copy link
Author

Thanks! I tried several times but I am having trouble with my Linux environment configuration on Windows, so I gave up. Hence, I am trying now using the python module, but I don't think there is a way to get a user's posts or a specific hashtag, correct? Here are the available options: https://github.com/stanfordio/gogettr/tree/main/tests

@lxcode
Copy link
Contributor

lxcode commented Oct 20, 2024

The hashtags API as currently implemented just returns trending news and takes no arguments.

There is a separate hashtag search API, but we currently don't have support for it, and I don't see an option to make it user-specific.

Support for the newer hashtag search would require v2 API support (#27), which uses a cursor instead of an offset. Closing for now.

@lxcode lxcode closed this as completed Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants