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

Added proxy support #239

Closed hackrush01 closed 7 years ago

hackrush01 commented 7 years ago

Added a method for retrieving proxy from system variables in scrape.py Fixes #178

hackrush01 commented 7 years ago

Can't understand how to pass the check. Tried coala in my pc still didn't work. but it passes pytest.

hackrush_st@hackrush:~/git-repos/UIP$ pytest
================================================================ test session starts =================================================================
platform linux -- Python 3.5.2+, pytest-3.0.4, py-1.4.31, pluggy-0.4.0
rootdir: /home/hackrush_st/git-repos/UIP, inifile: 
collected 5 items 

tests/test_scrape.py ....
tests/test_utils.py .

============================================================== 5 passed in 1.25 seconds ==============================================================
hackrush_st@hackrush:~/git-repos/UIP$
abhay-raizada commented 7 years ago

@hackrush01 pytest is the command for tests to run, coala is the command for coala

hackrush01 commented 7 years ago

So what do I do? I ran coala but it still didn't help. Why am I failing the travis-ci?

Edit: Can we set a greater limit for number of characters in a line?

abhay-raizada commented 7 years ago

@hackrush01 no, 80 is PEP8 standard and we are PEP8 compliant. Since at below 80 the code is more readable.

hackrush01 commented 7 years ago

So how do I correct my code?

abhay-raizada commented 7 years ago

@hackrush01 if its just the line length thats causing the error just split the code into multiple lines?

hackrush01 commented 7 years ago

Then also it doesn't get corrected, I tried that with my earlier commit.

-Regards -Amit Tulshyan

On 14-Dec-2016 3:02 pm, "Abhay Raizada" notifications@github.com wrote:

@abhsag24 commented on this pull request.

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

@@ -10,7 +10,7 @@ def make_soup(url): ''' makes soup, that is basically parsing the html document '''

  • response = requests.get(url, headers={'User-agent': 'UIP'})
  • response = requests.get(url, headers={'User-agent': 'UIP'}, proxies=getproxies())

if you're experiencing line-length difficulties

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NIT-dgp/UIP/pull/239, or mute the thread https://github.com/notifications/unsubscribe-auth/AQxPZo__NJcoBsDjlPXUZc0aHXlwl4Sjks5rH7eugaJpZM4LMPIH .

abhay-raizada commented 7 years ago

i see no reason why it shouldnt get corrected did you try applying the suggested patch?

hackrush01 commented 7 years ago

Suggested via coala, right?

abhay-raizada commented 7 years ago

yes

hackrush01 commented 7 years ago

Tried it. But I'll try once more tonight. See this https://travis-ci.org/NIT-dgp/UIP/builds/183728191

abhay-raizada commented 7 years ago

because that is still longer than 80 as shown by the bear, you have gtmake it smaller than that. Can you solve this on your own please? its simple really

hackrush01 commented 7 years ago

Okay, I'll do it by night.

hackrush01 commented 7 years ago

Will this be merged?

abhay-raizada commented 7 years ago

@hackrush01 I'm reviewing through my phone and I'm travelling till tomorrow afternoon. So I don't know how consistent I can be to get this merged very soon

hackrush01 commented 7 years ago

Oh that's totally fine.

abhay-raizada commented 7 years ago

@hackrush01 did you check this for your college Proxies? is there a way to test this? can you add a test for it?

hackrush01 commented 7 years ago

Yes, this works for college proxies. But I couldn't get you about that test thing! What is that? This works with or without proxies(if that's what you mean).

abhay-raizada commented 7 years ago

@hackrush01 i meant' could you write tests for this? so that we know it'll workfor all cases. See test_scrape.py also you have a merge conflict