Category : twitter

I’m working the NPM "twit" for Twitter, I’m trying to filter out all the other mentions in a tweet from tweet.text except the first mention (reply-to) tweet.entities.user_mentions shows ALL mentions tweet.text can contain both all mentions and regular message. tweet.entities.user_mentions outputs like user_mentions: [ [Object], [Object], [Object], [Object], [Object] ] Any suggestions to removing every ..

Read more

I am trying to collect only a specific part of the result obtained from the Twitter V2 API, the details regarding the return and the script I am trying to use will be placed below: The result data is: [{"created_at":"2021-06-09T00:31:36.000Z","source":"Twitter Web App","public_metrics":{"retweet_count":0,"reply_count":0,"like_count":2,"quote_count":0},"conversation_id":"1402423096229826562","possibly_sensitive":false,"id":"1402423096229826562","entities":{"urls":[{"start":126,"end":149,"url":"https ://t.co /7PnohIUXzY","expanded_url":"https://stake.com/?iid=sport%3A10916236&modal=bet&c=view","display_url":"stake.com/?iid=sport%3A1…"},{"start":150,"end":173,"url":"https ://t.co /hrBwrm600W","expanded_url":"https://twitter.com/stakehighroller/status/1402423096229826562/photo/1","display_url":"pic.twitter.com/hrBwrm600W"}]},"lang":"en","author_id":"1310800524619386880","reply_settings":"everyone","attachments":{"media_keys":["3_1402423081155526658"]},"text":"ALERT: New high roller bet posted!nA parlay bet has been ..

Read more

I’m trying to collect tweets from Twitter API V2: https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets The script I’m using to send the tweet value data to a Google Sheets cell is: function TwitterTest() { var string_Screen_name = "1310800524619386880"; var string_Consumer_key = "AAAAAAAAAAAAAAAAAAAAAAAAAA"; var string_Consumer_secret = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"; var tokenUrl = "https://api.twitter.com/oauth2/token"; var tokenCredential = Utilities.base64EncodeWebSafe(string_Consumer_key + ":" + string_Consumer_secret); var tokenOptions ..

Read more

Example link to tweet: https://twitter.com/stakehighroller/status/1400958163285790724 When using .push([obj_data[int_i].user.entities.url.urls[0].expanded_url]) the link that is collected is from the tweet itself, I would like to collect the attached link from the site which would be https://stake.com/?iid=sport%3A10750393&modal=bet&c=view. What is the necessary path for this? I’ve tried editing in various ways but what is always retrieved is the tweet link. ..

Read more

Here is snippet of my code. This code tweets and likes a tweet based on hashtag. Which function do I need to call for ‘Quote Retweet’ ? I am using Google script for code and trigger if (tweets) { props.setProperty("SINCE_TWITTER_ID", tweets[0]); for (var i = tweets.length – 1; i >= 0; i–) { twit.retweet(tweets[i]); twit.favorite(tweets[i]); ..

Read more

I am basically trying to sentiment analysis for given twitter username but there is no such example what I find on npm. Most of examples do search query for hashtags and I want to do it for specific username. Server.js app.post(‘/post’, (req, res) => { console.log(req.body) let query = req.body.query let tweets = searchTweet(query) asignScore(tweets).then(data ..

Read more

I am basically trying to sentiment analysis for given twitter username but there is no such example what I find on npm. Most of examples do search query for hashtags and I want to do it for specific username. Server.js app.post(‘/post’, (req, res) => { console.log(req.body) let query = req.body.query let tweets = searchTweet(query) asignScore(tweets).then(data ..

Read more

import requests from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.chrome.options import Options import time def checkLinkedIn(command): url = f"https://www.linkedin.com/in/{command}" path = "C:Program Files (x86)chromedriver.exe" options = Options() options.add_argument("–headless") driver = webdriver.Chrome(path, options=options) driver.get(url) soup = ..

Read more