Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
urlib2 issues
#7
(Dec-29-2016, 08:03 AM)snippsat Wrote: So just standard web-scraping,but why you want to do that from a google search?
The source is large,and can fail with SEO changes.
Can you just parse out from one of the many websites that do this eg whatismyipaddress.
Remember that some have API that give back IP in json to.

i have seen random errors from more than on such site.  i hame also seen them (or their providers) down for various lengths of time (mostly at night a one of them was down for 2 days in a row).  i regulaly use them now to routinely confirm that my VPN (that hides my activity from my ISP, and gives me my own IPv6) is up.   what i am trying to make is a tool that scrapes several of them in parallel, with timeouts, and gives me the address the majority find.

(Dec-29-2016, 08:22 AM)wavic Wrote: I prefer requests module too. Also it can handle cookies if it's needed.
But why are you asking Google for your IP? There are services which do exactly this. They even return different data format such a json for instance. Look at my first script ever.

http://python-forum.org/viewtopic.php?f=11&t=20075

google is just one the sites i will scrape.  i also expect it to be the most reliable.  i will be doing many of them.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
urlib2 issues - by Skaperen - Dec-29-2016, 07:03 AM
RE: urlib2 issues - by Larz60+ - Dec-29-2016, 07:19 AM
RE: urlib2 issues - by snippsat - Dec-29-2016, 07:38 AM
RE: urlib2 issues - by Skaperen - Dec-29-2016, 07:44 AM
RE: urlib2 issues - by snippsat - Dec-29-2016, 08:03 AM
RE: urlib2 issues - by Skaperen - Dec-29-2016, 08:53 AM
RE: urlib2 issues - by wavic - Dec-29-2016, 08:22 AM
RE: urlib2 issues - by wavic - Dec-29-2016, 09:04 AM
RE: urlib2 issues - by Skaperen - Dec-29-2016, 09:08 AM
RE: urlib2 issues - by wavic - Dec-29-2016, 09:30 AM
RE: urlib2 issues - by Skaperen - Dec-29-2016, 10:04 AM
RE: urlib2 issues - by wavic - Dec-29-2016, 10:15 AM
RE: urlib2 issues - by Skaperen - Dec-30-2016, 04:59 AM
RE: urlib2 issues - by wavic - Dec-30-2016, 07:53 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020