Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't find special characters #41

Closed
BeenHijacked opened this issue Nov 26, 2020 · 1 comment
Closed

Won't find special characters #41

BeenHijacked opened this issue Nov 26, 2020 · 1 comment

Comments

@BeenHijacked
Copy link

BeenHijacked commented Nov 26, 2020

When trying to find anything that contains a . in it I get no results.

url = 'https://pastebin.com/APSMFRLL'

# We can add one or multiple candidates here.
# You can also put urls here to retrieve urls.
wanted_list = ["."]

scraper = AutoScraper()
result = scraper.build(url, wanted_list)
print(result)

I would've expected to get:

one.two
three.four
five.six
seven.eight

Maybe I'm not doing something correctly perhaps.

@alirezamika
Copy link
Owner

The scraper looks for exact match, not patterns. Try this:

url = 'https://pastebin.com/APSMFRLL'

wanted_list = ["one.two"]

scraper = AutoScraper()
scraper.build(url, wanted_list)
result = scraper.get_result_similar(url, contain_sibling_leaves=True)
print(result)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants