Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
183c8a7
added badge (#36)
Logan1x Oct 16, 2017
d702b36
Update README.md (#37)
Logan1x Oct 16, 2017
30c1e2f
image to vector data (#35)
apuayush Oct 17, 2017
0992c26
Develop (#38)
Logan1x Oct 17, 2017
3418ea0
add offline dictionary (#45)
SuryaThiru Oct 18, 2017
07feb30
Sort scripts alphabetically (#48)
szepnapot Oct 19, 2017
e73e017
Set theme jekyll-theme-minimal
Logan1x Oct 20, 2017
a3fc020
Set theme jekyll-theme-architect
Logan1x Oct 20, 2017
c2099a6
Updated readme.md
Logan1x Oct 20, 2017
95940a3
Update README.md
Logan1x Oct 20, 2017
fd7fd85
Update README.md
Logan1x Oct 20, 2017
780965c
Added a python script to download high quality videos and audio using…
Oct 21, 2017
aef61fa
Feature/ftp download (#51)
ehnydeel Oct 23, 2017
4c9f7e4
added URL shortener (#55)
abhinavralhan Oct 24, 2017
e32313e
desciption of the Twitter_retweet_bot script (#54)
iyanuashiri Oct 24, 2017
d21c81e
added script to download formatted tweets from a specific user (#50)
pr0me Oct 24, 2017
8f36229
Meme density correction (#56)
Harshvardhan58 Oct 25, 2017
4275734
added cloud script (#57)
shivamp123 Oct 25, 2017
784ecbd
Update README.md (#59)
iyanuashiri Oct 26, 2017
a1cccde
Twitter retweet bot (#44)
iyanuashiri Oct 26, 2017
6131267
updated readme (#60)
Logan1x Oct 26, 2017
c59952c
Updated README.md (#61)
khushboopaddiyar Oct 26, 2017
90edb4c
Update README.md (#62)
ahadali Oct 26, 2017
f8675d9
Sentiment Analysis of Twitter Feeds (#64)
niharikakrishnan Oct 28, 2017
e8cc152
README.md (#72)
chiraag-jain Oct 28, 2017
01bf840
Edited the readme and arranged alphabetically (#75)
Logan1x Oct 31, 2017
e09e23b
Lost Robot script is added (#63)
dgupta777 Oct 31, 2017
bf8189e
Add new Feature getExternalIp.py (#53)
ehnydeel Oct 31, 2017
161cac8
Add fetch_html script (#52)
zinuzoid Oct 31, 2017
0f9e174
arranged root file directory
Logan1x Nov 7, 2017
91b0352
Added : readme.md (#78)
Logan1x Nov 7, 2017
8b5d00e
Added : Readme.md (#79)
Logan1x Nov 7, 2017
061adda
Merge branch 'develop' into master
Logan1x Nov 7, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added script to download formatted tweets from a specific user (#50)
  • Loading branch information
pr0me authored and Logan1x committed Oct 24, 2017
commit d21c81ece68b1bde4a1098bf5e7634a9a25a7d1d
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ python server.py
```


* ### Tweetload
Download latest tweets (default: up to 4000) from a specific twitter user. The script will create a file with one tweet per line, stripped from mentions, hashtags and links.
<br>
For that to work, create a json file with your twitter credentials (see source) and define the twitter user in source code.
```bash
python3 tweetload.py
```


* ### Twitter_retweet_bot
It is a simple script that retweets any hashtag provided in it.
```bash
Expand All @@ -221,18 +230,19 @@ python shortener.py url1 url2 > file.txt

```


* ### Video-downloader v1.1

### About

This file allows the user to download videos off of the web.

as of version 1 the user is able to download highquality videos as a playlist or single file as well as audio files from the supported
as of version 1 the user is able to download highquality videos as a playlist or single file as well as audio files from the supported

websites given here http://rg3.github.io/youtube-dl/supportedsites.html are supported.

More features will be added in the future iterations of the project.
a simple video downloader using youtube-dl Library, a starter script for making use
a simple video downloader using youtube-dl Library, a starter script for making use
of youtube-dl.

## Requirements
Expand Down Expand Up @@ -334,6 +344,8 @@ The following people helped in creating the above content.
* <a href="https://github.com/SuryaThiru" target="_blank">Surya K</a>
* <a href="https://github.com/szepnapot" target="_blank">Peter L.</a>
* <a href="https://github.com/ehnydeel" target="_blank">Andreas K.</a>
* <a href="https://github.com/pr0me" target="_blank">Lukas S.</a>
* <a href="https://github.com/iyanuashiri" target="_blank">Iyanu Ashiri</a>


### If you like the project give a star [<img src="Selection_008.png" alt="Star button" align="top">](https://github.com/Logan1x/Python-Scripts/stargazers)
59 changes: 59 additions & 0 deletions bin/tweetload.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import twitter
import json
import re

# replace 'default' with twitter user
user = 'default'
# path to json file with your twitter credentials (see https://python-twitter.readthedocs.io/en/latest/)
creds = 'creds.json'
file_name = 'tweets.txt'


def init_twitter():
# load twitter API tokens
with open(creds) as data_file:
data = json.load(data_file)

api = twitter.Api(consumer_key=data["consumer_key"],
consumer_secret=data["consumer_secret"],
access_token_key=data["access_token_key"],
access_token_secret=data["access_token_secret"])

return api


def main():
if user == 'default':
print("Please define the twitter user's screenname to download content from in source code.")
return

api = init_twitter()

# get up to 4000 latest tweets
tweets = api.GetUserTimeline(screen_name=user, count=200)
curr_id = tweets[-1].id
for i in range(19):
tweets = tweets + api.GetUserTimeline(screen_name=user, count=200, max_id=curr_id)
curr_id = tweets[-1].id

print("Tweets: " + str(len(tweets)))

# write tweets to file
with open(file_name, 'w') as file_o:
for tweet in tweets:
tweet_cont = tweet.text
# strip links
tweet_cont = re.sub(r'http\S+', '', tweet_cont)
# strip mentions
tweet_cont = re.sub(r'@\S+', '', tweet_cont)
# strip hashtags
tweet_cont = re.sub(r'#\S+', '', tweet_cont)
tweet_cont = tweet_cont.replace('RT: ', '')
tweet_cont = tweet_cont.replace('RT', '')
file_o.write(tweet_cont + '\n')




if __name__ == "__main__":
main()