Skip to content

Status: 502 — Try rerunning the code #7

Open

Description

@angyee

Webscraping-baby-yoda-with-requests-and-bs4,
ran the code but getting above error, how can I download google search images?

Activity

  1. sharingan3 commented on Aug 30, 2020

    @sharingan3

    When I played the game, every time I went to the end of the screen(aka. the wall) it just teleports me to the opposite end. I looked in the code for where it tells the snake to do that but I didn't find it. I want to change the code so the game will stop when I go to the end. Thanks!

  2. kalheyn commented on Nov 4, 2020

    @kalheyn

    Try adding 'user-agent' as a header in the request:
    requests.get(url, headers={'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36'})

    https://stackoverflow.com/questions/59799041/why-reddit-return-502-error-when-accessing-a-page-using-beautifulsoup4

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions