256 Kilobytes

Answers in Web Scraping, Data Analysis | By August R. Garcia


190 views, 1 RAM, and 0 comments

Tags: Python, Twitter, HTTP Requests

Profile Photo - August R. GarciaAugust R. GarciaLARPing as a Sysadmi...Portland, ORSite Owner

See code. Yeah, it seems like you do in fact have to make a bunch of additional HTTP requests.

def resolve_t_co(t_co_url):
        if t_co_url != None:
                return requests.get( t_co_url ).url 

urls = [
"https://t.co/eP5KQIUDBW"    ,   
"https://t.co/LC5Zjln2Wg"    ,   
"https://t.co/1nHwSk0JGr"    ,   
"https://t.co/zQvhJiak7x"    ,   
"https://t.co/LLHPhQiQX5"    ,   
"https://t.co/wMZAxhb9SZ"    ,   
"https://t.co/BB2M7f7rLO"    ,   
"https://t.co/BB2M7f7rLO"    ,   
"https://t.co/6QU0yEMff0"    ,   
"https://t.co/9G6sTbNrSo"    ,   

for url in urls: 
        print(url, resolve_t_co( url ) , sep="\t")

# Prints: 
# https://t.co/eP5KQIUDBW	https://grammar.yourdictionary.com/grammar-rules-and-tips/satire-writing-tips.html
# https://t.co/LC5Zjln2Wg	https://grammar.yourdictionary.com/grammar-rules-and-tips/basic-english-grammar-rules.html
# https://t.co/1nHwSk0JGr	https://www.yourdictionary.com/
# https://t.co/zQvhJiak7x	https://thesaurus.yourdictionary.com/disease
# https://t.co/LLHPhQiQX5	https://www.youtube.com/watch?v=kwdSbBwz4CU&feature=youtu.be&t=23
# https://t.co/wMZAxhb9SZ	https://examples.yourdictionary.com/examples-of-doublespeak.html
# https://t.co/BB2M7f7rLO	https://www.vox.com/policy-and-politics/2019/10/17/20919005/sondland-testimony-trump-impeachment-giuliani
# https://t.co/BB2M7f7rLO	https://www.vox.com/policy-and-politics/2019/10/17/20919005/sondland-testimony-trump-impeachment-giuliani
# https://t.co/6QU0yEMff0	https://www.logicallyfallacious.com/tools/lp/Bo/LogicalFallacies/10/Ad-Hominem-Guilt-by-Association
# https://t.co/9G6sTbNrSo	https://www.yourdictionary.com/gender

That feel when.

Users Who Have Downloaded More RAM:
Hash Brown (7 months ago)
🐏 ⨉ 1
Posted by August R. Garcia 7 months ago 🕓 Posted at 18 October, 2019 07:49 AM PDT

Sir, I can do you a nice SEO.

Post a New Comment

Do you like having a good time?

Register an Account

You can also login to an existing account or reset your password. All use of this site is subject to the terms of service and privacy policy.

Read Quality Articles

Read some quality articles. If you can manage to not get banned for like five minutes, you can even post your own articles.

View Articles →

Argue with People on the Internet

Use your account to explain why people are wrong on the Internet forum.

View Forum →

Vandalize the Wiki

Or don't. I'm not your dad.

View Wiki →

Ask and/or Answer Questions

If someone asks a terrible question, post a LMGTFY link.

View Answers →

Make Some Money

Hire freelancers and/or advertise your goods and/or services. Hire people directly. We're not a middleman or your dad. Manage your own business transactions.

Register an Account

Answers— Read More

Find more related content below!