fluquid/extract-social-media

How do I run?

Closed this issue · 4 comments

I fell like i'm being dumb, but i don't know what to do. I have python installed. I'm using windows btw

Have you looked at the quickstart in the Readme.md?

import requests
from html_to_etree import parse_html_bytes
res = requests.get('https://techcrunch.com/contact/')
tree = parse_html_bytes(res.content, res.headers.get('content-type'))

set(find_links_tree(tree))

The library is still in early development despite its age, but I'd be happy to get your feedback on it.

Hi @codinguncut. It is not working for the example https://www.lufthansa.com.

Any idea?

Have you looked at the quickstart in the Readme.md?

import requests
from html_to_etree import parse_html_bytes
res = requests.get('https://techcrunch.com/contact/')
tree = parse_html_bytes(res.content, res.headers.get('content-type'))

set(find_links_tree(tree))

The library is still in early development despite its age, but I'd be happy to get your feedback on it.

I think people are referring to the following error when running quickstart code in the README.md:

NameError: name 'find_links_tree' is not defined

This issue was resolved in #1 pull request but was never merged 😥

@SCR33M, add the following line of code to the quickstart code:

from extract_social_media import find_links_tree