Комментарии:
To anyone still trying to get this to work: Don't. Google changed how they use Google image search so it is a bit more difficult.
ОтветитьSe viu aquele cachorro?
Ответитьits not working for me :(
ОтветитьSnowden if you read this could you please do us a favor and make a 2020 update for this video? This seems to be pretty old
ОтветитьMake your life a lot easier. Parse the output with BeautifulSoup!
Ответитьwhich tool do you used?
ОтветитьI cant see the websites that is produced once you ran this code anymore using this example, do you happen to know why?
ОтветитьCan this be done with swift in Xcode?
ОтветитьAre you sure this works nowadays? it gets me 404 and returns nothing
ОтветитьIs it legal to query google like this ?
ОтветитьI'm looking for suggestions on how to automatically reverse image search to find the highest resolution image available (a bot for Reddit). I just learned how to use the praw API, but I don't know how to do the reverse image search portion and find the largest dimensions. Any ideas?
ОтветитьDoes the google path still works? It is showing 404 error
Ответитьnow you just need a captcha solver for when your program is banned... fun idea though
ОтветитьCan you make a video showing how to record somebody's voice and computer sound?
ОтветитьI noticed something about python and regexes. If the document you search get's too long (and i haven't determined the size yet but i had it happen on documents with merely a few kilobytes) a simple
re.findall(regex, string)
just stops to find matches. It does a bunch, but then stops in the middle of the document. That holds especially true the more complex the regex is, though easy regexes are still prone to it.
The only reliable option i found was to actually compile the regex into a regex object before you use it (if the same regex is used often, just put it into a global scope).
So i had to do
regex = re.compile(regex)
and later in the code i used it with
regex.findall(string)
That method has yet to fail me. I just mention it, since some google responses can be massive, and if you really want to catch all matches it's better to be sure.
Posted the user-agent line in the description, but here it is as well: opener.addheaders = [('User-agent', 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17')]
Ответитьwhoa very important to use the corresponding user agent as to the browser you use when catering the findLinks statement
found this worked for Chrome
user agent -> 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13'
findLinks=re.findall(r'<div class="rg_meta">{"os":".?","ou":"(.?)"',sourceCode)
awesome tutorial... did a reverse lookup of a cockshot and all i got were anteater gifs tho
Ответить