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

URLBear: Use library to extract links #2822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CLiu13
Copy link
Contributor

@CLiu13 CLiu13 commented Dec 12, 2018

This replaces the use of regex for extracting
links with the use of the URLExtract library.

Closes #1342

For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!

Checklist

  • I read the commit guidelines and I've followed
    them.
  • I ran coala over my code locally. (All commits have to pass
    individually.
    It is not sufficient to have "fixup commits" on your PR,
    our bot will still report the issues for the previous commit.) You will
    likely receive a lot of bot comments and build failures if coala does not
    pass on every single commit!

After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.

Please consider helping us by reviewing other peoples pull requests as well:

The more you review, the more your score will grow at coala.io and we will
review your PRs faster!

@CLiu13 CLiu13 force-pushed the urlbear-extract-links branch 2 times, most recently from 103d5de to b4acb90 Compare December 12, 2018 08:08
@CLiu13 CLiu13 force-pushed the urlbear-extract-links branch 3 times, most recently from 0c4d170 to 2268771 Compare December 13, 2018 02:23
bear-requirements.txt Outdated Show resolved Hide resolved
def test_detect_example_url_result(self):
invalid_file = """
http://example.com
""".splitlines()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is example.com an invalid url?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing code for URLBear allows the user to input regex that specifies certain links to ignore, and the run() function of URLBear specifies example.com as a link to ignore, hence why I marked example.com as invalid.

@jayvdb
Copy link
Member

jayvdb commented Feb 4, 2019

@gitmate-bot rebase

@gitmate-bot
Copy link
Collaborator

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@gitmate-bot
Copy link
Collaborator

Automated rebase with GitMate.io was successful! 🎉

@jayvdb
Copy link
Member

jayvdb commented Feb 6, 2019

@gitmate-bot rebase

@gitmate-bot
Copy link
Collaborator

Hey! I'm GitMate.io! This pull request is being rebased automatically. Please DO NOT push while rebase is in progress or your changes would be lost permanently ⚠️

@gitmate-bot
Copy link
Collaborator

Automated rebase with GitMate.io was successful! 🎉

@jayvdb
Copy link
Member

jayvdb commented Feb 6, 2019

Tests are failing.

@CLiu13
Copy link
Contributor Author

CLiu13 commented Feb 7, 2019

Tests are failing.

Failures are due to the use of URLExtract in requirements.txt since it's listed directly to its source on GitHub, rather than to its PyPi release (which is outdated and missing important changes). However, the owner has commented that they will do something about releasing a new version soon.

Update: URLExtract 0.9 was released on 2/16 and can be found here.

This replaces the use of regex for extracting
links with the use of the URLExtract library.

Closes coala#1342
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

URLBear: use library to extract links
5 participants