mirror of
https://gitlab.com/jeancf/twoot.git
synced 2024-11-27 22:11:11 +00:00
Added a bunch of TODO
This commit is contained in:
parent
992f91537f
commit
711ec9677a
11
twoot.py
11
twoot.py
|
@ -47,7 +47,7 @@ logging.basicConfig(filename="twoot.log", level=logging.INFO)
|
||||||
logging.info('*********** NEW RUN ***********')
|
logging.info('*********** NEW RUN ***********')
|
||||||
|
|
||||||
|
|
||||||
def process_tweet_content(tt_iter, twit_account, status_id, tweet_uri, get_vids):
|
def process_media_body(tt_iter, twit_account, status_id, tweet_uri, get_vids):
|
||||||
'''
|
'''
|
||||||
Receives an iterator over all the elements contained in the tweet-text container.
|
Receives an iterator over all the elements contained in the tweet-text container.
|
||||||
Processes them to remove Twitter-specific stuff and make them suitable for
|
Processes them to remove Twitter-specific stuff and make them suitable for
|
||||||
|
@ -299,7 +299,6 @@ def main(argv):
|
||||||
tweet_text = ''
|
tweet_text = ''
|
||||||
|
|
||||||
# Add prefix if the tweet is a reply-to
|
# Add prefix if the tweet is a reply-to
|
||||||
# <div class="replying-to">Replying to <a href="/tomwarren">@tomwarren</a></div>
|
|
||||||
replying_to_class = status.find('div', class_='replying-to')
|
replying_to_class = status.find('div', class_='replying-to')
|
||||||
if replying_to_class is not None:
|
if replying_to_class is not None:
|
||||||
tweet_text += 'Replying to ' + replying_to_class.a.get_text()
|
tweet_text += 'Replying to ' + replying_to_class.a.get_text()
|
||||||
|
@ -311,7 +310,13 @@ def main(argv):
|
||||||
# extract iterator over tweet text contents
|
# extract iterator over tweet text contents
|
||||||
tt_iter = status.find('div', class_='tweet-content media-body').children
|
tt_iter = status.find('div', class_='tweet-content media-body').children
|
||||||
|
|
||||||
tweet_text += process_tweet_content(tt_iter, twit_account, status_id, full_status_url, get_vids)
|
tweet_text += process_media_body(tt_iter, twit_account, status_id, full_status_url, get_vids)
|
||||||
|
|
||||||
|
# TODO Process quote: append link to tweet_text
|
||||||
|
|
||||||
|
# TODO Process card : extract image or youtube link
|
||||||
|
|
||||||
|
# TODO Process attachment: capture image or .mp4 url or download twitter video
|
||||||
|
|
||||||
# Add footer with link to original tweet
|
# Add footer with link to original tweet
|
||||||
tweet_text += '\n\nOriginal tweet : ' + full_status_url
|
tweet_text += '\n\nOriginal tweet : ' + full_status_url
|
||||||
|
|
Loading…
Reference in New Issue
Block a user