Closed nkprince007 closed 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- .
Sure, bro.
@nkprince007 looks really good, can you just add the entry for gui so that we are consistent?
Yeah, forgot about it... :P will get it fixed in a moment. :+1:
@nkprince007 Looks good feel free to merge. Also remember to open issue to use variable instead of constant values in GUI
Sure bro.. @abhsag24
Images are sourced using api.desktoppr.com
Resolves issue #212