Skip to content

Conversation

@lewis-morris
Copy link

@lewis-morris lewis-morris commented Jun 29, 2023

Changes

  • Added random header, so it appears different, not just user agent.
  • Added a POST version, that came from a JS free browser.
  • Added a multiple search version that takes multiple search terms and returns a dictionary of urls for each.
  • Added option for a random search in-between your terms as I was bulk searching similar terms and facing too many requests issues ( this solved that issue).
  • Added docstrings in all functions
  • Updated requirements and readme

Extra

I think these changes add an extra option for people who just want to grab urls - it appears to be faster with the post method also and I use regex to extract the url only (currently) - working on getting the advanced descriptions etc.

@lewis-morris lewis-morris changed the title added post method, as get was failing. Also did away with yeild, and … added post method, as get was failing on me. Jun 30, 2023
charsets = response.headers.get('content-type', '').lower()

# Apply decoding for multiple content codings
for coding in reversed(encoding.split(',')):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does requests not already do this?

@lewis-morris
Copy link
Author

lewis-morris commented Jul 17, 2023 via email

@thai-nm
Copy link

thai-nm commented Sep 21, 2023

I'm getting 429 errors - Too many requests as well. I think I can add more user agents to resolve the issue, and this PR is exactly (and above) what I need. If this is not merged, I'll raise a PR to add more user agents only.

@lewis-morris
Copy link
Author

lewis-morris commented Sep 22, 2023 via email

@lewis-morris
Copy link
Author

lewis-morris commented Sep 22, 2023 via email

@Nv7-GitHub
Copy link
Owner

Sorry about the long delay! I think it would be a lot cleaner if you added a new file for post requests, as the __init__.py is getting quite long. Once you do that and resolve the conflicts I can merge it. Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants