Merge lp://staging/~davidc3/ubuntu-rest-scopes/reddit-links-form-factor into lp://staging/ubuntu-rest-scopes

Proposed by David Callé
Status: Merged
Approved by: Facundo Batista
Approved revision: 370
Merged at revision: 376
Proposed branch: lp://staging/~davidc3/ubuntu-rest-scopes/reddit-links-form-factor
Merge into: lp://staging/ubuntu-rest-scopes
Diff against target: 345 lines (+69/-45)
4 files modified
README.txt (+1/-0)
locale/core.pot (+39/-39)
src/scopes/reddit.py (+18/-5)
src/scopes/tests/test_reddit.py (+11/-1)
To merge this branch: bzr merge lp://staging/~davidc3/ubuntu-rest-scopes/reddit-links-form-factor
Reviewer Review Type Date Requested Status
Facundo Batista (community) Approve
Review via email: mp+246705@code.staging.launchpad.net

Commit message

- Add python-bs4 to README
- Use Reddit mobile links when the client is not a desktop

Description of the change

- Add python-bs4 to README
- Use Reddit mobile links when the client is not a desktop

To post a comment you must log in.
Revision history for this message
Facundo Batista (facundo) wrote :

Please, keep all the "link building" together.

In your approach, you build part of the url in the main code, and then change it inside a helper function. A better approach would be to have something like

  def build_uri(permalink, platform):
    # deal with the url prefix and also the .compact postfix

... and then just:

  uri = build_uri(d['data']['permalink'], platform)

Also, note that pyflakes is complaining.

Thanks!!

review: Needs Fixing
370. By David Callé

Review comments : pyflakes, build links in one place

Revision history for this message
David Callé (davidc3) wrote :

Indeed, I missed that.

Revision history for this message
Facundo Batista (facundo) wrote :

Nice! thanks

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches