NITDgpOS / UIP

A library, to customize your desktop wallpapers.
https://nitdgpos.github.io/projects/UIP
GNU Affero General Public License v3.0
19 stars 45 forks source link

Add image source: desktoppr.com #215

Closed nkprince007 closed 7 years ago

nkprince007 commented 7 years ago

Images are sourced using api.desktoppr.com

Resolves issue #212

abhay-raizada commented 7 years ago

Ahh then can you change it and corresponding functions to have a more generic behaviour?

On 11-Dec-2016 9:19 AM, "Naveen Kumar Sangi" notifications@github.com wrote:

@nkprince007 commented on this pull request.

In uiplib/scrape.py https://github.com/NIT-dgp/UIP/pull/215:

@@ -90,6 +90,31 @@ def get_reddit_image_links(url, no_of_images): return image_links

+def get_desktoppr_image_links(url, no_of_images):

  • """
  • returns a list of tuples, (filename, image_url)
  • """
  • responses = []
  • image_links = []
  • index = 1
  • while len(responses) < no_of_images:
  • page_url = url + ('?page=%d' % index)
  • page = requests.get(page_url)
  • data = json.loads(page.text)

But that method is defaulted to append .json to the url

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NIT-dgp/UIP/pull/215, or mute the thread https://github.com/notifications/unsubscribe-auth/AIIwP-o33on9BpleY0NKNVni1Y-yD17gks5rG3LFgaJpZM4LJwv- .

nkprince007 commented 7 years ago

Sure, bro.

abhay-raizada commented 7 years ago

@nkprince007 looks really good, can you just add the entry for gui so that we are consistent?

nkprince007 commented 7 years ago

Yeah, forgot about it... :P will get it fixed in a moment. :+1:

abhay-raizada commented 7 years ago

@nkprince007 Looks good feel free to merge. Also remember to open issue to use variable instead of constant values in GUI

nkprince007 commented 7 years ago

Sure bro.. @abhsag24