Is there any way to search tweet by url? [closed] - python

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
https://twitter.com/metakongz_G/status/1502223321009913857?t=PVLQS03E87nARHxbOMBjDQ&s=19
I have this target url. I want to get this tweet's retweets and comments using tweepy.
However it seems to be like tweepy does not support searching with url. How can I?

There are several ways:
Try to use automated browsers: There is an interesting manual that can help with Selenium and Python
Use official or unofficial Twitter APIs, example from RapidAPI
Get tweet id from url (numbers between "/status/" and "?") and use tweepy by id like here:
url = "https://twitter.com/metakongz_G/status/1502223321009913857?t=PVLQS03E87nARHxbOMBjDQ&s=19"
id = url.split("/status/")[1].split("?")[0]
print(id)

Related

Google Books API Authors [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm using the Google Books API and I want the api to send me back book info about a specific author (like list some of their books). However my link currently doesn't seem to be doing that as whenever I use the inauthor parameter, all the books it sends me aren't written by the author.
For example:
'https://www.googleapis.com/books/v1/volumes?q=inauthor: emilyhenry & printType=books&langRestrict=en&key=mykey'
none of the books returned with this link are written by emily henry.
you need to factor in the space(so first name plus last name) in author's name. so it will be emily+henry
so api call will be:
https://www.googleapis.com/books/v1/volumes?q=inauthor:emily+henry&printType=books&langRestrict=en&key=mykey
When running the same request with the given url, I am also getting back books not written by the given author. However, if I remove the spaces in the url that shouldn't be there, I get back 0 books. I think your search of "emilyhenry" isn't yielding results.

How can I get Youtube videos after searching through the Youtube api [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to make a python program that uses Youtube's api. The thing that I want to do is searching Youtube videos and showing the results in my program. Program gonna run like this: There is gonna be a textbox you write something and hit enter then you'll see the Youtube results below . What should I do for doing this in python or is this impossible?
Youtube has a Data API with very helpful example snippets. I would suggest reading through the official documentation before proceeding.
Relevant section: https://developers.google.com/youtube/v3/docs/search/list
Snippet tool instructions: https://google-developers.appspot.com/youtube/v3/code_samples/code_snippet_instructions

extracting html code from urls list [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to get a html code value from many urls for the same domain and as example
the html code is the name
and the domain is facebook
and the urls is just like
https://www.facebook.com/mohamed.nazem2
so if you opened that url you will see the name is Mohamed Nazem
at shown by the code :
‏‎Mohamed Nazem‎‏ ‏(ناظِم)‏
as so that facebook url
https://www.facebook.com/zuck
Mark Zuckerberg
so the value at the first url was >Mohamed Nazem<
and the second url it's Mark Zuckerberg
hopefully you got what i thinking in..
To fetch the HTML page for each url you will need to use something like the requests library. To install it, use pip install requests and then in your code use it like so:
import requests
response = requests.get('https://facebook.com/zuck')
print(response.data)

Discussion comments from Coursera [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I would like to do a simple machine learning project where I want to analyse comments from discussion forums on Coursera courses.
However, I am not sure if it is possible to do so programatically. So, providing a course page address, user name, password and getting all the discussion forums comments.
Being able to use Python for this would be awesome but I am language agnostic.
You can access web pages with python using urllib:
https://docs.python.org/2/library/urllib.html
or the higher lever interface requests:
http://requests.readthedocs.org/en/latest/
Then you still have to parse the content of the page and extract the comments.

How to get stream from Google+ REST API using python? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have been browsing the Google Plus APIs and I can't seem to figure out if its possible to get the stream of posts(feed) of all those people who I have circled.
I have read through the Google+ API documentation and even tried Google's API explorer, but couldn't seem to figure out how to do it.
It's a very important feature of any API, which really shouldn't be missing to stream automatically on my page.
Check out https://developers.google.com/+/api/latest/people/list.
GET https://www.googleapis.com/plus/v1/people/me/people/connected
import requests
import json
r = requests.get('https://www.googleapis.com/plus/v1/people/me/people/connected')
input_log = json.loads(r.text)

Categories